def DestroyMethod(self): # make sure that gc is deleted. gc may have a shared memory ximage # which is not freed if the gc is not destroyed leaving unused shared # memory segments in the system even after the process has finished. self.gc = None PyWidget.DestroyMethod(self)
def DestroyMethod(self): if self.context_menu is not None: self.context_menu.clean_up() self.context_menu = None PyWidget.DestroyMethod(self)