dependency: add debug information for dependency refcounting
parent
4934205737
commit
e71a5a3370
|
@ -229,6 +229,7 @@ pkgconf_dependency_ref(pkgconf_client_t *client, pkgconf_dependency_t *dep)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dep->refcount++;
|
dep->refcount++;
|
||||||
|
PKGCONF_TRACE(client, "%s refcount@%p: %d", dep->package, dep, dep->refcount);
|
||||||
return dep;
|
return dep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +250,10 @@ pkgconf_dependency_unref(pkgconf_client_t *client, pkgconf_dependency_t *dep)
|
||||||
if (client != dep->owner)
|
if (client != dep->owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (--dep->refcount <= 0)
|
--dep->refcount;
|
||||||
|
PKGCONF_TRACE(client, "%s refcount@%p: %d", dep->package, dep, dep->refcount);
|
||||||
|
|
||||||
|
if (dep->refcount <= 0)
|
||||||
pkgconf_dependency_free_one(dep);
|
pkgconf_dependency_free_one(dep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue