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.
To reproduce: 1) Create a vw project 2) Add a table component to the page 3) Delete the component 4) Clean-Build the project 5) repeat steps 2-4 as needed This appears to cause a memory leak in the LiveUnit.listeners field. [#document: null]: java.awt.EventDispatchThread@aae359-threadLocals-> java.lang.ThreadLocal$ThreadLocalMap@1994823-table-> [Ljava.lang.ThreadLocal$ThreadLocalMap$Entry;@1de7a22-[479]-> java.lang.ThreadLocal$ThreadLocalMap$Entry@1f41719-value-> org.netbeans.modules.visualweb.jsfsupport.container.RaveFacesContext@31b070-liveContext-> org.netbeans.modules.visualweb.insync.live.LiveUnit@1ae6feb-listeners-> java.util.ArrayList@136f67d-elementData-> [Ljava.lang.Object;@a93492-[61]-> org.netbeans.modules.visualweb.insync.live.DesignBeanNode$BeanChildren@14b4add-parent-> org.netbeans.modules.visualweb.insync.live.FacesDesignBean@d784bb-bean-> org.netbeans.modules.visualweb.insync.faces.FacesBean@1f2abb5-element-> org.netbeans.modules.visualweb.designer.markup.RaveElement@f8036e-ownerDocument-> org.netbeans.modules.visualweb.designer.markup.RaveSourceDocument@1ada746
Looking at it.
I am able to see the leak.
Looks like the DesignContextListener is registered in: org.netbeans.modules.visualweb.insync.live.DesignBeanNode.BeanChildren.addNotify() and removed in: org.netbeans.modules.visualweb.insync.live.DesignBeanNode.BeanChildren.removeNotify() However the Javadoc for: org.openide.nodes.Children.removeNotify() says: "Note that this is usually not the best place for unregistering listeners, etc., as listeners usually keep the child nodes in memory, preventing them from being collected, thus preventing this method to be called in the first place." Thus the listener need to removed in some other place e.g. when the beans is deleted/destroyed. Investigating further...
Fixed: changeset: 65211:035aad3d1eaf user: Sandip V. Chitale <sandipchitale@netbeans.org> date: Wed Jan 30 10:24:27 2008 -0800 summary: Bug Fix # 125961 memory leak in LiveUnit.listeners