about summary refs log tree commit diff
path: root/kcc.py
diff options
context:
space:
mode:
Diffstat (limited to 'kcc.py')
-rw-r--r--kcc.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/kcc.py b/kcc.py
index 95f927e..727d075 100644
--- a/kcc.py
+++ b/kcc.py
@@ -99,6 +99,11 @@ class QApplicationMessaging(QtWidgets.QApplication):
             self._server.newConnection.connect(self.handleMessage)
             self._server.listen(self._key)
 
+    def __del__(self):
+        if self._memory.isAttached():
+            self._memory.detach()
+            self._server.close()
+
     def isRunning(self):
         return self._running