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 269797 - Memory leak in FileSearchAction.panel
Summary: Memory leak in FileSearchAction.panel
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Jump To (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: PATCH_AVAILABLE, PERFORMANCE
Depends on:
Blocks:
 
Reported: 2017-02-10 14:50 UTC by Jesse Glick
Modified: 2017-06-19 17:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Possible fix (not yet tested) (701 bytes, patch)
2017-02-10 14:51 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2017-02-10 14:50:06 UTC
20170130 dev build with hundreds of megs consumed after closing all projects, closing all project-related windows, etc. Analyzing leaked project references in a dump, one I found with this root reference trail:

org.apache.maven.project.MavenProject
org.apache.maven.project.MavenProject.parent
org.netbeans.modules.maven.api.customizer.ModelHandle2.project
org.netbeans.modules.maven.customizer.CustomizerProviderImpl.handle2
org.openide.util.lookup.SingletonLookup.objectToLookup
org.openide.util.lookup.ProxyLookup$RealInternalData.lookups
org.netbeans.modules.projectapi.LazyLookupProviders$1Prov$1.data
java.util.ArrayList.elementData
org.netbeans.spi.project.support.DelegatingLookupImpl.currentLookups
org.netbeans.modules.maven.NbMavenProjectImpl.completeLookup
org.netbeans.modules.jumpto.file.FileDescription.project
org.netbeans.modules.jumpto.file.FileSearchAction$AsyncFileDescriptor.delegate
org.netbeans.modules.jumpto.file.FileSearchPanel.selectedFile
org.netbeans.modules.jumpto.file.FileSearchAction.panel
org.openide.loaders.FolderInstance$1R.instances
org.openide.awt.MenuBar$LazyMenu$MenuFolder.creationTask
org.openide.awt.MenuBar$MenuBarFolder.waitFor
org.openide.awt.MenuBar.menuBarFolder

It seems `FileSearchPanel` holds a strong reference to a given `Project`, so the `panel` field needs to be cleaned up. `cleanup` deletes `dialog`, which is good, but not `panel`.
Comment 1 Jesse Glick 2017-02-10 14:51:16 UTC
Created attachment 163611 [details]
Possible fix (not yet tested)
Comment 2 Jesse Glick 2017-06-19 17:21:46 UTC
That patch does not work—causes bug #270909.