(OSD BRANCH) Fix memory issues with QT debugger