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 148125 - Memory leak in LayerUtils.layerHandleCache
Summary: Memory leak in LayerUtils.layerHandleCache
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-09-24 00:10 UTC by Jesse Glick
Modified: 2010-10-15 20:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-09-24 00:10:39 UTC
The value of this WeakHashMap refers strongly to the key, so neither will ever be collected. In general this kind of
problem is unsolvable in Java:

http://bugs.sun.com/view_bug.do?bug_id=6389107

In this case the cache can probably be strong only for layers currently modified in memory, else use SoftReference.

(Found in a heap dump where a NbModuleProject was leaked this way.)
Comment 1 Jesse Glick 2010-10-15 20:33:07 UTC
core-main #e8b2c6684490