Commit 85ea48e9 authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

fix memory leak

parent a9b3c194
......@@ -2,3 +2,5 @@
-- aggiungere property con i nomi delle schede/canali e dei sensori
-- separare la gestione del socket dal thread
-- refactor for reading sensors, not boards
......@@ -77,6 +77,7 @@ class DataAcquisitionThread(threading.Thread):
while True:
self.leak = False
leak_ok = False # at evry read cycle reset ok flag
self.problems.clear()
if not self.connected_socket:
try:
self.sock = self.get_connected_socket()
......@@ -207,7 +208,8 @@ class DataAcquisitionThread(threading.Thread):
self.device.attr_leak_read = self.leak
status_old = self.status
self.status = ""
del self.status
self.status = ''
for problem in self.problems:
self.status += problem + "\n"
if self.status != status_old:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment