|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
public abstract class Object
Base class for Widgets and various other elements in GTK.
This is the wrapper around GtkObject
!
Since the GObject type system was abstracted out from GTK some time
after GTK was first written, GtkObject
predates
GObject
; almost all of the functionality originally resident
in GtkObject
was moved to GObject
long ago. Its
presence in the type hierarchy is largely for backwards compatibility. Only
people hacking on java-gnome itself will have any need to interact with
this class, and then only rarely.
Nested Class Summary | |
---|---|
static interface |
Object.Destroy
Signal handler for when an Object requests that all other code holding references to it release those references. |
Method Summary | |
---|---|
void |
connect(Object.Destroy handler)
Hook up a Object.Destroy handler. |
void |
destroy()
Ask everything connected to this object to release its references. |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void connect(Object.Destroy handler)
Object.Destroy
handler.
public void destroy()
remove()
if you don't need the Widget any more.
We didn't expose this for a long time in java-gnome; after all,
memory management of both Java references and GObject Ref counts is
handled automatically by the diabolical cunning of this most excellent
library. It turns out, however, that this does not free()
the GtkObject's memory; it really only does what it says: ask other
GtkObjects to drop whatever Refs they may be holding to this object.
Thus if this GtkWidget is in a GtkContainer and you call
destroy()
the GtkContainer will drop its Refs to this
GtkWidget thereby breaking its parent-child relationship.
Note that Java's references remain, so the object will not,
in fact, be eligable for finalizing until you drop all your references;
ie, the Java side Proxy Object goes out of scope. Nevertheless calling
this will speed up release of resources associated with a Widget, so
it's a good idea. Once you've done so, finalize()
will be traversed a short time later and the GObject will be
released.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |