'Called as the app dies - too late to prevent it here!'

def ExitInstance(self):

    win32ui.OutputDebug('Application    shutdown\n')
    try:
        win32ui.InstallCallbackCaller(self.oldCallbackCaller)
    except AttributeError:
        pass
    if self.oldCallbackCaller:
        del self.oldCallbackCaller
    self.frame = None
    self.idleHandlers = []
    if self._obj_:
        self._obj_.AttachObject(None)
    self._obj_ = None
    global App
    global AppBuilder
    App = None
    AppBuilder = None
    return 0
