From fecb1ffd3db9ac9e0bd2e5cc97ce85fc9039aedc Mon Sep 17 00:00:00 2001
From: Insoleet <insomniak.fr@gmail.com>
Date: Tue, 12 May 2015 11:25:29 +0200
Subject: [PATCH] Dirty hack to stop crashes due to GC

---
 src/cutecoin/core/watching/monitor.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/cutecoin/core/watching/monitor.py b/src/cutecoin/core/watching/monitor.py
index ca179e92..da4c3eb2 100644
--- a/src/cutecoin/core/watching/monitor.py
+++ b/src/cutecoin/core/watching/monitor.py
@@ -15,6 +15,11 @@ class Monitor(object):
     The monitor is managing watchers
     '''
 
+    # Dirty hack to avoid GC on monitors
+    # GC was causing random crashes
+    # We will get rid of QThreads asap
+    ___dirty_monitors = []
+
     def __init__(self, account):
         '''
         Constructor
@@ -25,6 +30,7 @@ class Monitor(object):
         self._blockchain_watchers = {}
         self._network_watchers = {}
         self._persons_watchers = {}
+        Monitor.___dirty_monitors.append(self)
 
     def blockchain_watcher(self, community):
         return self._blockchain_watchers[community.name]
-- 
GitLab