Bug report #3531
Bug: QgisApp instance never delete
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||13591|
By the time application finishes, QgisApp instance won't be deleted.
It happens, because it's constructor is never called.
Instance of QgisApp is created in function main(main.cpp),
but main finishes with myApp.exec().
So when application will be about to close, instance will still be in the memory and won'be deleted.
#2 Updated by 05092009 - almost 10 years ago
Just set a breakpoint in QgisApp's destructor, and close application. Debugger won't go there.
Try to have a look on the code. QgisApp, as you know, is a singleton. It's instance is created in funcion main (main.cpp), but instance should be deleted in a straightforward way, by calling delete. Instead of these, no delete called and main just returns QApplication's exec.
That causes all the data, associated with QgisApp to stay in memory 4ever.