80 ''' The function will be called when particular plugin is being
81 unloaded from memory. Clean up any widgets that you have added
82 to the interface (toolviews etc).
84 ATTENTION Be really careful trying to access any window, view
85 or document from the @unload handler: in case of application
86 quit everything is dead already!
88 plugin = sys._getframe(1).f_globals[
'__name__']
89 qDebug(
'@unload: {}/{}'.format(plugin, func.__name__))
91 def _module_cleaner():
92 qDebug(
'@unload/cleaner: {}/{}'.format(plugin, func.__name__))
93 if plugin
in init.functions:
94 qDebug(
'@unload/init-cleaner: {}/{}'.format(plugin, func.__name__))
95 del init.functions[plugin]