<AWT Dev> Standalone test was: Memory leaks due to static references in AWT & Swing
Jaroslav Tulach
jtulach at netbeans.org
Thu Jul 21 03:04:28 PDT 2011
>## 20. 7. 2011 12:32:02 ##<
> >## 20. 7. 2011 10:04:26 ##<
> > But do you have test which can prove that any of these fields cause
> > real memory leak?
>
> Yes, I have a test. My whole motivation is to fix our tests. Here is one of
> them:
> http://hg.netbeans.org/ergonomics/file/f6cc96cf2c44/core.windows/test/unit/
> src/org/netbeans/core/windows/services/NbPresenterLeakTest.java
I've modified the above test to be standalone (see attachement). It fails in
about 50% of cases
---
Exception in thread "main" java.lang.AssertionError: Dialog disappears.
org.netbeans.core.windows.services.NbPresenterLeakTest.assertGC(NbPresenterLeakTest.java:181)
org.netbeans.core.windows.services.NbPresenterLeakTest.main(NbPresenterLeakTest.java:100)
---
on my computer. I am running Kubuntu 11.04 and using:
---
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
---
Can we proceed with evaluation of my patch now?
-jt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NbPresenterLeakTest.java
Type: text/x-java
Size: 6829 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20110721/989cc816/NbPresenterLeakTest.java
More information about the awt-dev
mailing list