dbus cleanup question
Havoc Pennington
hp at pobox.com
Thu Feb 21 07:23:37 PST 2008
Hi,
On Thu, Feb 21, 2008 at 10:18 AM, Macartney, Geoff
<gmacartney at tycoint.com> wrote:
> I'm talking through my hat - I've actually called dbus_bus_get twice; my
> library is composed of two bits, one to listen for events on dbus, which
> calls dbus_bus_get; and another bit to send messages to dbus, which can
> be used without the listening side of things being invoked (it does a
> send, then a flush). This second bit also does dbus_bus_get, in order to
> get a handle to the bus so it can send the event.
>
> Is this my problem? Do I need to arrange so that I only call the
> dbus_bus_get once?
>
It's fine to call it twice, but then you own two references that you
have to drop before you shutdown, instead of one reference.
Havoc
More information about the dbus
mailing list