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 219603 - Memory leak in org.openide.awt.ToolbarWithOverflow$2
Summary: Memory leak in org.openide.awt.ToolbarWithOverflow$2
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: Theofanis Oikonomou
Depends on:
Reported: 2012-10-05 14:12 UTC by Petr Cyhelsky
Modified: 2012-10-09 07:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2012-10-05 14:12:06 UTC
Product Version: NetBeans IDE Dev (Build 201210020001)
Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09
System: Linux version 3.2.0-31-generic running on amd64; UTF-8; en_US (nb)

Steps to reproduce: Open some projects -> open some documents from these projects. -> close these documents -> close the projects -> invoke full gc repeatedly -> take heap dump -> there will be numerous instances of ToolbarWithOverflow$2 and consequently also instances of NbEditorDocuments and others which are held by it.

This is most likely caused by #216175

If heap dump is required, I can provide it
Comment 1 Theofanis Oikonomou 2012-10-08 10:26:21 UTC
I tried to reproduce but in the created heap dump there were no instances of ToolbarWithOverflow. 

I could only spot instances of NbEditorToolBar and also NbEditorDocuments. It does not seem to be a problem with ToolbarWithOverflow. 

Could you please also provide your heap dump so I could further investigate? Thank you
Comment 2 Petr Cyhelsky 2012-10-08 13:02:23 UTC
You have to look for ToolbarWithOverflow$2 !! there should be same number of ToolbarWithOverflow$2 as ToolbarWithOverflow + all its subclasses the heapdump is at
Comment 3 Petr Cyhelsky 2012-10-08 13:08:12 UTC
The heap dump is taken from ide with no open documents or projects and is taken after numerous full GCs and waits, so there should be no instances of NbEditorDocument there are 7 and all are held via ToolbarWithOverflow$2. This needs to be fixed ASAP because it also blocks further memory leak testing.
Comment 4 Theofanis Oikonomou 2012-10-08 13:36:20 UTC
Thank you for the heap dump. Fixed:
Comment 5 Petr Cyhelsky 2012-10-08 14:06:47 UTC
patch works fine - verified
Comment 6 Quality Engineering 2012-10-09 02:06:19 UTC
Integrated into 'main-golden', will be available in build *201210090002* on (upload may still be in progress)
User: Theofanis Oikonomou <>
Log: Issue #219603 - Memory leak in org.openide.awt.ToolbarWithOverflow$2