Hi,
When I look at projects like gnome-screensaver and gnome-power-manager
I see that for their own created gobject types only the finalize
function is implemented to cleanup the resources in the end of the
application.
gnome-volume-control uses only implements the dispose function
I understand
Hi,
For Totem we use dispose to unref any objects and finalize to free any
private memory and close any sockets/DB connections/other fluff, which
is (I believe), how you're supposed to do it.
If you only use dispose you'd have to put a lock variable in to stop any
private memory getting freed mul
Hello,
iirc, the GObject documentation states that dispose may be called
multiple times,
and the object must still be usable even after dispose is called, so
freeing memory
in dispose is wrong, even with locks.
Actually both dispose and finalize are needed if your object hold
references to other
Hmm,
Now that I re read what I wrote, it seems like it was misleading, I
didn't mean that the dispose should dereference other objects it holds
more than once.
Anyway, quoting the GObject tutorial :
"The dispose method is called when the object first knows it will be
destroyed. It is supposed to
On Sun, Mar 23, 2008 at 8:00 AM, Ali Sabil <[EMAIL PROTECTED]> wrote:
> Hello,
>
> iirc, the GObject documentation states that dispose may be called
> multiple times,
> and the object must still be usable even after dispose is called, so
> freeing memory
> in dispose is wrong, even with locks.