This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] handle menu bar removal/disposal
- From: Fernando Nasser <fnasser at redhat dot com>
- To: Kim Ho <kho at redhat dot com>
- Cc: java-patches <java-patches at gcc dot gnu dot org>
- Date: Wed, 21 Jan 2004 15:31:09 -0500
- Subject: Re: [PATCH] handle menu bar removal/disposal
- Organization: Red Hat , Inc. - Toronto
- References: <1074714482.30539.2.camel@tomaluk.toronto.redhat.com>
Kim Ho wrote:
(...)
Index: java/awt/MenuComponent.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/MenuComponent.java,v
retrieving revision 1.13
diff -u -r1.13 MenuComponent.java
--- java/awt/MenuComponent.java 16 Dec 2003 20:08:01 -0000 1.13
+++ java/awt/MenuComponent.java 21 Jan 2004 19:44:51 -0000
@@ -324,6 +324,13 @@
return "name=" + getName();
}
+protected void
+finalize() throws Throwable
+{
+ removeNotify();
+ super.finalize();
+}
+
// Accessibility API not yet implemented.
// public AccessibleContext getAccessibleContext()
I would add finalize() methods right after the constructors.
BTW, isn't there another way to get removeNotify called that is not by using
finalize()?
Regards,
Fernando