From db03761e16f945fdc639f88a0c316eeda665980b Mon Sep 17 00:00:00 2001 From: Umut Tezduyar Lindskog Date: Fri, 10 Jul 2015 14:31:53 +0200 Subject: man: sd_unref does not necessarily free the bus Document that sd_unref() does not necessarily free the bus, even if no part of the program explicitly refs it, due to the queued messages. --- man/sd_bus_default.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'man/sd_bus_default.xml') diff --git a/man/sd_bus_default.xml b/man/sd_bus_default.xml index 95b347bdfd..782dfb5706 100644 --- a/man/sd_bus_default.xml +++ b/man/sd_bus_default.xml @@ -219,6 +219,12 @@ one. Use sd_bus_unref3 to drop the reference. + + Queued messages also keep a reference to the bus. For this reason, just + because no application is having a reference to the bus does not mean that + the bus object will be destroyed. Until all the messages are sent, the bus object + will stay alive. sd_bus_flush can be used to send all the + queued messages so they drop their references. -- cgit v1.2.1