This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
All the welcome screen UI, including a 1MB large image is strongly statically referenced in the IDE even after the welcome screen is dismissed. This presents at least a 1MB memory leak. Workaround is to close the welcome screen and restart the IDE. Although the leak is constant and typically present only for the first usage of the IDE, I think it could be fixed for 4.0 as the fix should be trivial and it affects all users.
Yeah, that should be easy. I'll WeakReference it.
fixed in trunk by changing the static reference to WelcomeComponent singleton instance to a WeakReference. Checked in profiler that there is no other reference to the instance and that it is really being disposed. committed to trunk: o/n/m/w/WelcomeComponent.java rev1.3 http://ide.netbeans.org/source/browse/ide/welcome/src/org/netbeans/modules/welcome/WelcomeComponent.java.diff?r1=1.2&r2=1.3
Fix required for 4.0. Please go through the high res process.
Diff reviewed without objections.
As pointed out by Petr Nejedly, there was a bug in manipulation of the weak reference. > The fix is wrong. Idea is OK, but the implementation isn't. > you can't safely do: > > if (wr.get()!=) return wr.get(); > > proper code is: > > Object o = wr.get(); > if (o != null) return o; I fixed it and commited a new version 1.4 The diff is here http://ide.netbeans.org/source/browse/ide/welcome/src/org/netbeans/modules/welcome/WelcomeComponent.java.diff?r1=1.3&r2=1.4
Fixed in release40.
Verified in release4.0 Note: One have to move focus somewhere after closing the component to really free it, due to design of WinSys.