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

+6 -1
View File
@@ -170,7 +170,12 @@ class PerAppVolumeControl(Box):
def _populate_apps(self):
"""Populate the widget with current audio applications"""
# Clear existing widgets
# Clear and DESTROY existing widgets to prevent memory leaks
for child in list(self.apps_container.get_children()):
try:
child.destroy()
except Exception:
pass
self.apps_container.children = []
self._app_widgets.clear()