Next: , Previous: file-filter, Up: Gtk+ Objects

6.4.19 gtk-object

— Class: gtk-object

Superclass: g-initially-unowned

Subclasses: recent-filter file-filter cell-renderer tree-view-column adjustment widget

gtk-object is the base class for all widgets, and for a few non-widget objects such as adjustment. gtk-object predates g-object; non-widgets that derive from gtk-object rather than g-object do so for backward compatibility reasons.

The gtk-object::destroy signal asks all code owning a reference to an object to release said reference. So, for example, if you call gtk_object_destroy() on a gtk-window, GTK+ will release the reference count that it owns; if you call gtk_object_destroy() on a button, then the button will be removed from its parent container and the parent container will release its reference to the button. Because these references are released, calling gtk_object_destroy() should result in freeing all memory associated with an object, unless some buggy code fails to release its references in response to the "destroy" signal.