Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

left-over pointers to disposed frames etc?



Is there a chance that the JRE implementation keeps references to disposed Swing objects and prevents them from being garbage collected?

In other words: are there any tests, in the JDK test suite, or in anything that Apple does, that makes sure the Swing run-time environment does not keep references it shouldn't?

Example in point: I had a JDialog, which I showed and then disposed(). It doesn't get garbage-collected, however, because (according to the profiler)

"static variable of class com.apple.mrj.internal.awt.frames.SimpleFramePeer"
which, apparently, references a
com.apple.mrj.internal.awt.frames.VFramePeer
which in turn keeps a thumb on my disposed JDialog, and all the megabytes of GUI that used to be in there ... Fortunately I don't depend on finalize() being called ...

There seem to be similar problems with InputContexts, and also with respect to focus. In case of the InputContext, this seems to be a non-Apple-specific problem (there are statics in the Sun source code), but the others are in Apple-specific packages.

Can anyone with access to the Apple Java source code tell me what is going on?

Thanks,



Johannes.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.