[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dispose vs. finalize
From: |
Ben Pfaff |
Subject: |
Re: dispose vs. finalize |
Date: |
Sun, 03 Apr 2011 13:09:39 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
[I guess I must have forgotten pspp-dev on the first email.
Added.]
John Darrington <address@hidden> writes:
> On Sun, Apr 03, 2011 at 12:00:36PM -0700, Ben Pfaff wrote:
> The GObject reference manual seems to say that the "dispose"
> function for a GObject should do most of the work of destroying
> an object, e.g. "When dispose ends, the object should not hold
> any reference to any other member object."
>
> It also says, about base_finalize, "Never used in practice.
> Unlikely you will need it."
>
> But I see that some of PSPPIRE's classes don't obey these rules.
> Is there a good reason for this, that I should pay attention to?
>
>
> No. Some of the gtk documentation I find confusing. So it's quite
> possible that I've not followed all the rules. But then a lot of
> the patterns I took from the Gtk source itself - In many instances
> it doesn't follow its own rules.
I'm sure that's true. I also find the gtk/glib/gobject
documentation confusing (or merely incomplete) in many cases.
> Or is it OK for me to move code from finalize or base_finalize as
> I work on related parts of the GUI?
>
> Please feel free to improve on it.
Thank you.
--
Ben Pfaff
http://benpfaff.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: dispose vs. finalize,
Ben Pfaff <=