def _onDestroyed(self, mobject):
    self._destroyed = True
    om.MMessage.removeCallbacks(self._state['callbacks'])
    for callback in self.onDestroyed:
        try:
            callback(self)
        except Exception:
            traceback.print_exc()
    _data.pop(self.hex, None)
def _onDestroyed(self, mobject):
    self._destroyed = True
    om.MMessage.removeCallbacks(self._state['callbacks'])
    for callback in self.onDestroyed:
        try:
            callback(self)
        except Exception:
            traceback.print_exc()
    _data.pop(self.hex, None)