related to memory leak

This commit is contained in:
sankalp committed 2026-04-23 16:09:52 +05:45
1 parent 7eb21daf2f
commit 6577c19dcb
25 files changed
+610 -68

No files matched your search

+13
View File
@@ -88,3 +88,16 @@ class ModusDropdown(PopupWindow):
return
self.set_visible(False)
modus_service.dropdowns_hide = not modus_service.dropdowns_hide
def destroy(self):
"""Clean up resources and global references"""
global dropdowns
if self in dropdowns:
dropdowns.remove(self)
try:
modus_service.disconnect_by_func(self.hide_dropdown)
except Exception:
pass
super().destroy()