lpcmanager

Parents 67800351d235
Children e42521549e20
Fixed python process kept in memory after frame being closed when WAMP connection was used. Was caused by cleanup not being invoked in OnCloseFrame().
--- a/LPCBeremiz.py Tue Dec 18 14:43:49 2018 +0100
+++ b/LPCBeremiz.py Fri Jan 25 14:09:27 2019 +0100
@@ -78,18 +78,12 @@
Frame doesn't really close, but just hide.
Message is sent to Composer to signal app being closed.
"""
- if self.CheckSaveBeforeClosing(_("Close Application")):
- wx.Frame.Hide(self)
-
- self.CTR.ResetAppFrame(self.lpcberemiz_cmd_pipe)
-
- self.CTR.KillDebugThread()
- self.KillLocalRuntime()
-
- self.SaveLastState()
-
+ if self.TryCloseFrame():
+ # "Exit" being sent by composer after "Closed" sent by IDE
self.lpcberemiz_cmd_pipe.write("Closed\n")
+ # Prevents "Exit" command to trigger this call a second time
+ self.Unbind(wx.EVT_CLOSE)
event.Veto()
--- a/LPCCommand.py Tue Dec 18 14:43:49 2018 +0100
+++ b/LPCCommand.py Fri Jan 25 14:09:27 2019 +0100
@@ -139,7 +139,7 @@
self.RefreshTimer.start()
def Exit(self):
- self.Close()
+ #self.Close()
self.Launcher.app.ExitMainLoop()
return True