code: public boolean close(){
  		if(super.close()){
  			dockableHolder.dispose();
  			dockableHolder.removeWindowFocusListener(this);
  			WindowListener[] listeners = dockableHolder.getWindowListeners();
              for (WindowListener listener : listeners) {
                  dockableHolder.removeWindowListener(listener);
              }
  			Lm.setParent(null);
  			dockableHolder.removeAll();
  			dockableHolder.getRootPane().removeAll();
  			dockableHolder = null;
  			return true;
  		}
  		else{
  			return false;
  		}
  	}
docs: Overridden close method to avoid memory leaks by Mikael Valot