Memory leak in dbus / dbus-c++ ?

P. Durante shackan at
Tue Jul 31 12:51:33 PDT 2007


On 7/31/07, Olivier Hochreutiner <olivier.hochreutiner at> wrote:
> Hi,
> After experimenting some more dbus with the dbus-c++ binding, it
> turned out that there is a memory leak.
> It can be easily reproduced with the echo-client/echo-server example
> of dbus-c++. The amount of memory used by echo-client linearly
> increases. I tested only under Windows, but I have no reason to think
> it does not happen under Linux. Anyway it's very easy to reproduce.
> I used BoundChecker to detect where the memory that is not freed in
> allocated. It reports three places in the code (see attached file). I
> investigated the problem a bit and it seems that reply messages are
> not freed ?
> Thanks,
> Olivier
> _______________________________________________
> dbus mailing list
> dbus at

you're right, I should have assumed that objects returned by the api
already had their reference count increased by libdbus, I just changed
the binding to handle this case

thank you,

More information about the dbus mailing list