def destroy_control ( self, control ):
        # Block signals to prevent any editors from being updated (the control
        # will not be deleted immediately).
        control.blockSignals(True)

        # This may be called from within the finished() signal handler so we
        # need to do the delete after the handler has returned.
        control.hide()
        control.deleteLater()

        # PyQt v4.3.1 and earlier deleteLater() didn't transfer ownership to
        # C++, which is necessary for the QObject system to garbage collect it.
        if qt_api == 'pyqt':
            if QtCore.PYQT_VERSION < 0x040302:
                import sip
                sip.transferto(control, None)

    #---------------------------------------------------------------------------
    #  Destroys all of the child controls of a specified GUI toolkit control:
    #---------------------------------------------------------------------------
Destroys a specified GUI toolkit control.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/toolkit.py/GUIToolkit.destroy_control