Re: [Re: gobject weak references]
- From: Murray Cumming <murrayc usa net>
- To: Sven Neumann <sven gimp org>, murrayc usa net
- Cc: gtk-devel-list gnome org
- Subject: Re: [Re: gobject weak references]
- Date: 18 Sep 2001 16:38:44 BST
Sven Neumann <sven gimp org> wrote:
> 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?
Oh, OK, if the memory hasn't been freed yet then I have no problem with using
the pointer.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]