This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] handle menu bar removal/disposal


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]