Hi!
I’ve been trying to remove/unregister a DefaultSingleCDockable that has been previously added to a CControl.
This is what I do:
// initializing
CControl dockControl = ... ;
gridArea = dockControl.createGridArea("grid");
grid = new CGrid(dockControl);
DefaultSingleCDockable dockable = ...;
// when I add it to the dock control:
dockControl.add(dockable);
grid.add(0, 0, 1, 1, dockable);
gridArea.deploy(grid);
…
// later when I want to remove it:
dockControl.removeSingleDockable(dockable.getUniqueId());
The dockable is removed but the tab stills show, now without a close button. The component that has been added to the dockable I’m trying to remove is never garbage collected and I see some references to it being held by docking frames. I’m not sure what else I need to call in order to have the dockable totally unregistered and allow the component that once was there to be garbage collected (provided that I also don’t hold strong references to it).
What am I missing? Am I doing something wrong when adding or removing the dockable?
Thank you!
Eduardo