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.
The NbSheet.nodes field retains nodes that may no longer be in use, even when the properties window is closed. This has an effect on visual web projects that have been closed, since model objects are attached to the DesignBeanNode objects held by NbSheet. To reproduce: 1) Create a web project w/ the visualweb framework 2) Close the navigator window (suppresses another memory leak) 3) DnD some components to the page 4) Close Page1.jsp and close the project After doing this, the properties window is closed, but the nodes are still held by NbSheet. To clear them, the properties window needs to be opened again.
fixed /cvs/core/src/org/netbeans/core/NbSheet.java,v <-- NbSheet.java new revision: 1.41; previous revision: 1.40 done Checking in test/unit/src/org/netbeans/core/NbSheetTest.java; /cvs/core/test/unit/src/org/netbeans/core/NbSheetTest.java,v <-- NbSheetTest.java new revision: 1.4; previous revision: 1.3
saubrecht, PropertySheet.helperNodes also need to be cleared off, by calling propertySheet.setNodes(new Node[0] or null?) in NbSheet.componentClosed() Also see, http://www.netbeans.org/issues/show_bug.cgi?id=125322
The nodes also need to be cleared off from the SheetNodesListener. Though, I may not have waited for nodeDestroyed to be called, during my profiling. Just a thought, do you think it is better to call setNodes(new Node[0]) in componentClosed(), instead of nodes = null; propertySheet.setNode...; ...
fixed Checking in core/src/org/netbeans/core/NbSheet.java; /cvs/core/src/org/netbeans/core/NbSheet.java,v <-- NbSheet.java new revision: 1.43; previous revision: 1.42 done Checking in core/test/unit/src/org/netbeans/core/NbSheetTest.java; /cvs/core/test/unit/src/org/netbeans/core/NbSheetTest.java,v <-- NbSheetTest.java new revision: 1.5; previous revision: 1.4 done Checking in openide/explorer/test/unit/src/org/openide/explorer/propertysheet/PropertySheetTest.java; /cvs/openide/explorer/test/unit/src/org/openide/explorer/propertysheet/PropertySheetTest.java,v <-- PropertySheetTest.java new revision: 1.4; previous revision: 1.3 done Checking in openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java; /cvs/openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java,v <-- PropertySheet.java new revision: 1.23; previous revision: 1.22