From b08d62d8c9d2a15e3b26d3247b4466ffd83ad697 Mon Sep 17 00:00:00 2001
From: Alexandros Asonitis <asoalexandros@gmail.com>
Date: Tue, 1 Oct 2024 17:40:14 +0200
Subject: [PATCH] bug fix with deleting the tool

---
 hp4155/memristor_final/help.py      | 2 ++
 hp4155/memristor_final/memristor.py | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/hp4155/memristor_final/help.py b/hp4155/memristor_final/help.py
index 8de07ce..96851a5 100644
--- a/hp4155/memristor_final/help.py
+++ b/hp4155/memristor_final/help.py
@@ -85,6 +85,8 @@ def test_contacts():
             print(f"R{i}{j}:{R} Ohm")
             #print(f"Contact check of smu{i} and smu{j} failed!")
     
+    del device
+    
 
 
 #double sweep from start to stop and then from start to stop
diff --git a/hp4155/memristor_final/memristor.py b/hp4155/memristor_final/memristor.py
index 8db2534..9b4fc48 100644
--- a/hp4155/memristor_final/memristor.py
+++ b/hp4155/memristor_final/memristor.py
@@ -273,6 +273,8 @@ def on_set_button_clicked(b):
 
         #unlock device
         device.inst.unlock()
+
+        del device
         
         change_state(buttons)
         change_state(parameters)
-- 
GitLab