JDK-6597821 : WWindowPeer leaks AppContexts
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-08-27
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b21Fixed
Related Reports
Relates :  
Description
While investigating 6482575 (Leak in ImageIcon) I found that we're also leaking AppContexts from WWindowPeer.  A static Set named trackedAppContexts was added to fix 6503472 in b15.  AppContexts are added to this Set, but never removed.

As with 6482575, I used Chris Oliver's JApplication to reproduce this (along with a small application to show a frame).  See his "Poor Man's Multi-VM" blog entry for details:
http://blogs.sun.com/chrisoliver/entry/poor_man%27s_multi-vm

Comments
EVALUATION Fixed in jdk6u12 as a part of 6714829.
09-02-2009

SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/7/6597821/
29-08-2007

EVALUATION we use set of AppContexts to track list of AppContexts for which we have registered KFM listener for activeWindow property. I think we could the set with one more key in AppContext's map which will report if we have added the listener or not (simple boolean).
28-08-2007