Re: gobject chaining up



On Tue, 2004-11-02 at 07:50 +0100, Stefan Kost wrote:
> hi all,
> 
> another question for the gobject tutorial:
> 
> Should gobject classes always chain up to the parent clases in
> dispose
> finalize
> <any other>
> 
> For objects that directly inherrit from gobject imho it make no difference, but
> e.g. for object that derive from gtk-widgets it is important to chain up.
> 
> Stefan

The dispose and finalize methods (if overridden) must chain up, or
you'll leak the memory allocated by GObject (the instance's "struct
_GObject" and any object data that's been set). Otherwise it depends on
the method and class (e.g. in GObject, get/set_property must not,
constructor must, etc.).

-- 
Peace,

    Jim Cape
    http://esco.mine.nu
    http://ignore-your.tv

    "If even one reporter had stood up during a pre-Iraq Bush press
     conference last year and shouted, `Bullshit!' it might have made a
     difference."
        -- Matt Taibbi, New York Press

Attachment: signature.asc
Description: This is a digitally signed message part



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