Fixes memory leak of DolphinMainWindow
In the main function the DolphinMainWindow was stored in a plain old
pointer causing it to be leaked, instead keep it in a QPointer so
we are sure it is correctly freed when the application exists.
Details
Details
- Reviewers
elvisangelaccio
This leak was found using Address Sanitizer
Diff Detail
Diff Detail
- Repository
- R318 Dolphin
- Branch
- fixes_leak_of_main_window (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 1322 Build 1340: arc lint + arc unit
Comment Actions
QPointer is not a smart pointer and doesn't handle memory. But we don't need it anyway, because we have the Qt::WA_DeleteOnClose attribute set which does the cleanup.
I think this is just a false positive from ASAN, since Qt::WA_DeleteOnClose is a Qt-specific thing that ASAN probably doesn't know.
Comment Actions
Yes, you are right. I can see from testing that I have mixed up my changes a little bit :)
Closing this one...