How do I release objects in the Java-gnome library? First of all, I give an example ...
package GUI; Import org.gnome.gdk.Event; Import org.gnome.gtk.button; Import org.gnome.gtk.Widget; Import org.gnome.gtk.Window; The Public Class A window enforces the window. DeletEvent {Private Button b; Public A () {this.b = new button (); } Public Boolean onDeleteEvent (widget w, event e) {this.b.destroy (); This.destroy (); This.release (); return false; }} Should I use deleted and release functions while working on this code? How to eventually release the objects?
Java-gnome API website:
Its free open source, if u can see it for me:
File: "java-gnome-4.0. 19.tar.gz "Thanks for the help :)
Based on this link:
It seems that it will happen. Of course, just like text in italic, it can not remove all references to the object in Java only in the GObject system, but otherwise, it looks correct. Once your reference is out of the scope, then it should be completely removed, along with all those children who have left you. I would also recommend that if you are destroying a window with many children, and if you destroy each one of them, call call.Hide () in your first step View onDeleteEvent:
After reading through the docs looking for release () , I did not find it listed anywhere in org.gnome.glib.Object, but no Not even real direct methods from the object I would advise to use it.
Comments
Post a Comment