RE: [gtk-list] uref'ing or destroying





> -----Original Message-----
> From: Per Erik Stendahl [mailto:berrs@update.uu.se]
> Sent: Friday, August 20, 1999 4:02 PM
> To: gtk-list@redhat.com
> Subject: [gtk-list] uref'ing or destroying
> 
> 
> 
> Hi.
> 
> What is the correct thing to do when you want to destroy an object?
> gtk_object_destroy() seems to be the advertised method, but that
> doesn't respect the reference count of the object (at least not
> in 1.2.2 as far as I can see). Looking at gtk_object_unref() I
> see that it will call gtk_object_destroy() when the reference
> count hits zero. Is gtk_object_unref() a Better Way then?
> 
>From an OO point of view: YES. But if you don't use gtk_object_ref (), then there is no practical reason to do so. For closing a window problaly doesn't matter which type of destruction you use, since you probably only have one pointer pointing to it.

It's up to U...

regards

Arjan



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