Hi,
is this a possible mem leak or do I need to manage destroy of a Menu myself?
When I use the DEV CONSOLE tab watch (show hidden & undrawn & generated), the menu and its shadow are still there when clicking the destroy button here. I thought it was a problem with the peer, but menu1 which doesn't have shadow, also is still showing up.
in attachement screenshot:
the watch tab after destroy
FireFox 4 - dev mode
SNAPSHOT_v8.3d_2012-04-04/Pro Deployment (built 2012-04-04)
regards,
is this a possible mem leak or do I need to manage destroy of a Menu myself?
When I use the DEV CONSOLE tab watch (show hidden & undrawn & generated), the menu and its shadow are still there when clicking the destroy button here. I thought it was a problem with the peer, but menu1 which doesn't have shadow, also is still showing up.
Code:
Menu menu1 = new Menu(); menu1.setID("myMenu1"); menu1.setShowShadow(false); MenuItem item11 = new MenuItem("something"); menu1.setItems(item11); Menu menu2 = new Menu(); menu2.setID("myMenu2"); menu2.setShowShadow(true); menu2.setShadowDepth(3); MenuItem item21 = new MenuItem("something else"); menu2.setItems(item21); IconMenuButton choose1 = new IconMenuButton("One"); choose1.setID("myButton1"); choose1.setMenu(menu1); IconMenuButton choose2 = new IconMenuButton("Two"); choose2.setID("myButton2"); choose2.setMenu(menu2); final HLayout menuContainer = new HLayout(); menuContainer.setMembers(choose1, choose2); Button d = new Button("destroy"); d.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { menuContainer.destroy(); } }); VLayout layout = new VLayout(); layout.setWidth(300); layout.setHeight(300); layout.setMembers(menuContainer, d); return layout;
the watch tab after destroy
FireFox 4 - dev mode
SNAPSHOT_v8.3d_2012-04-04/Pro Deployment (built 2012-04-04)
regards,
Comment