This post describes how to manage the lifecycle of QObjects in C++ by using smart pointers with custom deleters which invoke deleteLater. Qt has it’s own lifecycle for QWidgets/Objects that is distinct from the usual C++ object lifecycle. Most of the time that is essentially a non-issue. Normally, QWidgets last for the lifetime of the […]
When using Qt in python, any QObject with a connection to at least one of its signals is not eligible for garbage collection. This makes it very easy to have memory leaks when using dynamically created QWidgets. In order to not leak memory, you must disconnect any slots from all signals on the QObject before […]