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.
I have the following scenario: 1) There is a singleton object O which holds its lookup, which is an instance of AbstractLookup. 2) There is a view which displays tree based on Nodes derived from AbstractNode class. This view contains a node like: node = new AbstractNode(Children.LEAF, O.getLookup()); 3) The view gets recreated from time to time in the way that all nodes including the root are thrown away and new nodes are created. 4) The Issue is that the nodes with the lookup of the object O are not garbage collected at all. The problem is probably in the class Node, which holds an LookupEventList. This in turn registers itself as a LookupListener to a result from the provided Lookup (line 1833). This result accumulates references to the LookupEventLists. And because there is always at least one node which uses this result, the result is not freed by the GC and so its listener list grows holding more and more LookupEventList. Because the LookupEventLists reference their nodes, the nodes are also not freed by GC. This may be also to cause of https://netbeans.org/bugzilla/show_bug.cgi?id=248022