Re: libdbus-1: unref a filter handler's message arg?

Thiago Macieira <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <1897516.qyV60Hyu8D@tjmaciei-mobl1>
On quarta-feira, 20 de julho de 2016 05:13:59 PDT Norris, David wrote:
> Hi,
> 
> When using libdbus-1, should dbus_message_unref() be called inside the
> DBusHandleMessageFunction passed to dbus_connection_add_filter()? I've been
> doing so, but recently started noticing assertion failures:

For every ref() that you call, you call one unref(). No more, no fewer.

> This leads me to think I shouldn't unref the message object inside the
> function, and that I should only unref messages I actually "own" (i.e., I
> created them). Is that correct, or do I need to look a little deeper for
> problems elsewhere in my binding? Thanks!

Correct.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.