Re: gobject weak references



Hi,

Murray Cumming <Murray_Cumming betaresearch de> writes:

> Actually I think that your example is a bit hackish. I would prefer to
> use an ID that's passed through data or is stored in the object's
> quark-data-thing mechanism. If there's no absolute need to use an
> invalid pointer then we shouldn't give people the opportunity.

I don't think it is hackish at all. The pointer is not invalid, it's
only not pointing to a functional GObject anymore since the GObject
is in the process of being finalized when the notifier is being called.
Why would you want to add the overhead of an ID mechanism if there
already is a perfectly valid ID, the memory address of the GObject?


Salut, Sven




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