def destroy(self):

        control = self.control
        if control is not None:
            control.hide()
            self.component.destroy()
            control.setParent(None)
            control.deleteLater()

        self.control = None
        self.component = None
Destroy the toolkit-specific control that represents the pane.
dataset/ETHPy150Open enthought/pyface/pyface/tasks/enaml_dock_pane.py/EnamlDockPane.destroy