I have a GUI application in Python 3.x. The GUI object contains other class instances, which contains other class instances and there's also variables throughout. I have made a reset button which runs GUI.destroy()
and then an outside function which says del GUIobject
and then recreates it as a fresh object.
I have been watching my memory in task manager while using the reset button like 30 times, every time after using the program a bit (not spamming it) and the memory usage only goes up, never down.
Is this a problem with garbage collection? Do I need to call del
on the objects inside the GUI object? What can I do to release the memory to where it was when I first opened the program?