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 59911 - Leaking WeakEventListenerList
Summary: Leaking WeakEventListenerList
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-06-13 17:26 UTC by _ rkubacki
Modified: 2009-11-02 10:55 UTC (History)
1 user (show)

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 _ rkubacki 2005-06-13 17:26:22 UTC
There is a special version of EventListenerList in editor holding weak
references to listeners that consumes too much memory and retains unneeded
WeakReference objects. 

Changes from editor settings are fired pretty rarely so all the settings
listeners are kept for a long time. Usualy the are leaking - users usualy do not
modify the settings too often. I have a core dump where >700 weak references to
listeners are held in this array and most of these are already empty. Close and
reopen file adds 10 listeners. 

Another waste of memory is storing of class names - all three usages do no need
to store different listeners in this list.
Comment 1 Miloslav Metelka 2005-11-07 12:04:15 UTC
IIRC only the empty references should be held in the array (together with class
refs) once the listeners are GCed. Although this is IMHO not a serious leak we
plan to deprecate the Settings and use MimeLookup instead which should eliminate
the problem. We will also no longer use EventListenerList and use WeakListeners
instead.
Marking TM to future.
Comment 2 Miloslav Metelka 2008-11-12 10:26:47 UTC
IMHO this is now not serious since the WeakListenerList is only used actively in CustomizableSideBar and Registry (now
replaced by EditorRegistry) so this is a low priority problem.
Comment 3 Quality Engineering 2009-11-02 10:55:37 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX