It can be bindings (SIP) or even python, but I have a problem with Qt (pyqt4).
I have a QTabWidget, and inside it I put widgets that can be closed.
I have a widget that allocates about 400 MB of memory. I did not set the parent, and I call deleteLater()on close, but nothing happens. Even a python gc call does not work:
import gc
gc.collect ()
Now when you close a widget from QTabWidget without using deleteLater(), more and more memory is allocated. So let's say that I open 4 tabs of a large-scale memory widget, I use about 1.6 GB of memory. If I close them all and open a new one, I now use up to 2 GB of memory.
If I use deleteLater(), after closing 4 tabs, I do not go up to 2 GB, opening a new one, then I need to open 5 tabs. But, and here is the problem, 1.6 GB is still allocated for the process (python), even if all the widgets are closed and has been called deleteLater.
thank
source
share