Re: cleanup data set with g_object_set_data()



On Sat, Dec 17, 2005 at 11:45:42AM +0100, Olivier Sessink wrote:
if data is set with g_object_set_data(), is that automatically freed if
the object is unreffed?

No, but you can use g_object_set_data_full() instead and
pass something like g_free as the last argument.

Of course, the function is called when the object is
destroyed, not when it's just unreferenced.

Yeti


--
That's enough.



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