refcount of bus returned from sd_bus_default_system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heya,

when writing sdbus-c++, we've observed that sd_bus_default_system function called in a fresh new thread returns a bus with initial ref count 2. We built our code upon that assumption -- we had to unref the bus twice when the thread local storage got freed, otherwise we'd have gotten memory leaks.

Now it broke, however, because in systemd v242, the initial ref count is 1. Is that a conscious change? Can we build upon the guarantee that it will always be 1? (1 actually seems reasonable, unlike 2).

Thanks,

Stan.

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux