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.
In constructor of EditorSupport.Editor (rev 1.172), a WeakListener holding EditorSupport.del is created and added to node. With each opening of java file, the same EditorSupport.del is added to the node (via WeakListener), but is not removed, as EditorSupport.del is quite long- lived (referenced from DataObject). The memory leak itself is quite small here, and the potential performance problem does not show up (as the user normally does not close/open the same file many times), but it is a leak, and also an example of WeakListener misuse...
Created attachment 7762 [details] allocation stack trace
There are three entities: Node (long living object) EditorSupport$Del (long living object) EditorSupport$Editor (relatively to the above short living object) IMO no 3rd party (Editor) should attach a foreign listener (Del) to an object of its interrest (Node). (Editor is spamming a Del by events from Node ;-) Either the Del is interrested in events on Node and then it should subscribe itself (and only once). If only Editor is interrested in these events (and I believe this is the case - it does forward icon/title changes to TopComponents (the Editors)) then it should listen itself.
Similar cause to issue #27645, even the consequences are different. I'm going to solve it the same way. Hm, the text package is really messy :-(.
Fixed in [trunk] openide/../text/EditorSupport.java 1.173
verified/closed