def prepare_destruction(self):
        """Get rid of circular references"""
        self._tool = None
        self._painter = None
        self.relieve_model(self._selection)
        self._selection = None
        # clear observer class attributes, also see ExtendenController.destroy()
        self._Observer__PROP_TO_METHS.clear()
        self._Observer__METH_TO_PROPS.clear()
        self._Observer__PAT_TO_METHS.clear()
        self._Observer__METH_TO_PAT.clear()
        self._Observer__PAT_METH_TO_KWARGS.clear()
def prepare_destruction ( self ) : self . _tool = None self . _painter = None self . relieve_model ( self . _selection ) self . _selection = None self . _Observer__PROP_TO_METHS . clear ( ) self . _Observer__METH_TO_PROPS . clear ( ) self . _Observer__PAT_TO_METHS . clear ( ) self . _Observer__METH_TO_PAT . clear ( ) self . _Observer__PAT_METH_TO_KWARGS . clear ( )
Get rid of circular references