[systemd-devel] [RFC][PATCH] sd-dhcp-client: return NULL from _unref() like the other sd-* libraries
Lennart Poettering
lennart at poettering.net
Fri May 23 17:58:40 PDT 2014
On Thu, 22.05.14 15:29, Tom Gundersen (teg at jklm.no) wrote:
> Let's keep this behavior consistent across our libraries.
>
> In order to keep the refcounting working, a DONT_DESTROY macro similar
> to the one in sd-bus was introduced.
The DON_DESTROY stuff you only really need when you dispatch some
calback from a function call. It's there to make sure that the callback
can drop the final ref for the object, but you can still access the
object after it finished. There's no point in placing the macro in all
functions, that's entirely unnecessary.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list