Re: GdkColormap -> GObject

On 16 May 2000, Havoc Pennington wrote:

> Question: why does GObject lack a destroy() method? Should C++
> bindings make destroy() a method for widgets only (in particular if
> GObject doesn't have destroy(), I'm having a hard time deciding why
> GtkAdjustment and GtkTooltips have a destroy(), aside from legacy
> compatibility).

right, GtkAdjustment/GtkData etc... got that for compatibility reasons,
i.e. anything deriving from GtkObject got destroy for compatibility.
for GObject, i don't see a good way to implement a destroy method,
some object systems may not want to invoke it through a signal (BSE)
some object systems may want their objects to be resurrectable after
destroy() has been called (gtk) and yet other ones may not even need
a destroy function (Gdk).
so rather than introducing a destroy() method on GObject basis which
will introduce even more source incompatibilities (besides the finalize()
method stuff that we already have for Gtk objects), and that will change
semantics like a chamaeleon according to the object system being used,
i just leave it up to the immediate derivatives of GObject to implement
that functionality, piggy back on shutdown() if required (shutdown() in
itself really shouldn't be used for much stuff besides destroy()

> Havoc


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