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 org.openide.explorer.propertysheet.PropertyDialogManager is leaking anonymous instances of PropertyChangeListeners that are registered on the component field. Attached diff fixes the issue. Steps: 1. Create VW Web Project 2. Expand to and select the body node (under Page1 node )in the Outline (Navigator) window. 3. In the property sheet click on the [...] button of style property and cancel the dialog. 4. Do this 10 times. Save and close the page. 5. Take a heap dump using tool like jmap. 6. Load the heap dump in NetBeans profiler. 7. Search for class named StyleBuilderPanel or PropertyDialogManager. 8. Show its instances in the Instances window. 9. You will see 10 instances. 10. Show the GC root of any instance. You will see the leak. Apparently code uses the same field which isassigned two instances of anomymous PropertyChangeListeners. So the reference to the first is lost. Also the code does not seem to be be attempting to remove the listener from component field but only from editor field.
Created attachment 54211 [details] Diff with possible fix for the leak.
BTW this leak happens for Border property editor for in JPanel form also.
fixed /cvs/openide/explorer/src/org/openide/explorer/propertysheet/PropertyDialogManager.java,v <-- PropertyDialogManager.java new revision: 1.12; previous revision: 1.11