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.

Bug 191416 - Leak of NbDialog
Summary: Leak of NbDialog
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2010-10-27 16:58 UTC by Jesse Glick
Modified: 2013-05-21 12:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Heap dump GC root reference chain (40.92 KB, image/png)
2010-10-27 16:58 UTC, Jesse Glick
Details
suggested fix (1.45 KB, patch)
2010-11-02 16:20 UTC, Stanislav Aubrecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-10-27 16:58:40 UTC
Created attachment 102687 [details]
Heap dump GC root reference chain

While tracking down a leak of many closed projects in 101026-de2112c9e0f2, I found a complex leak in at least one case of the DataObject for the manifest.mf in a NbModuleProject (which indirectly holds the project for several valid reasons). Tracking down the reference chain for the DataObject, I found it held by some Java parser information associated with a WhereUsedQueryUI, ultimately held by the button listener on an NbDialog, i.e. the "Find Usages" dialog, which of course I had long since closed. I'm not sure exactly why this is being held, but the fact that a long-closed Dialog can be held in memory is a major problem. If there is no clear way to release the Dialog itself, then NB must at least remove all of its components and clear any fields which might link to module objects (buttonListener in this case).
Comment 1 Stanislav Aubrecht 2010-11-02 16:16:32 UTC
looks like a bug in refactoring - ParametersPanel keeps references to usage dialog instance
Comment 2 Stanislav Aubrecht 2010-11-02 16:19:30 UTC
looks like a bug in refactoring - ParametersPanel keeps references to usage dialog instance
Comment 3 Stanislav Aubrecht 2010-11-02 16:20:43 UTC
Created attachment 102758 [details]
suggested fix
Comment 4 Jesse Glick 2010-11-02 16:24:54 UTC
Well that would be an easy fix if it works!
Comment 5 Jan Becicka 2010-11-03 13:00:09 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/9f615e461de6
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2010-11-03 10:58
Message:   Issue #191416 - Leak of NbDialog