Fix memory leak due to getTestMonitor()

Authored by dfaure on May 9 2019, 9:28 AM.

Description

Fix memory leak due to getTestMonitor()

Summary:
asan build said the Monitor was leaked, and it was indeed.
Fixed using std::unique_ptr.

Test Plan:
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DECM_ENABLE_SANITIZERS="address" -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_SHARED_LINKER_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc++' .. && make && ctest
(with an asan build of Qt)

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: kde-pim

Differential Revision: https://phabricator.kde.org/D21093

Details

Committed
dfaureMay 9 2019, 11:28 AM
Reviewer
dvratil
Differential Revision
D21093: Fix memory leak due to getTestMonitor()
Parents
R165:24b0e5a62fa7: Akonadi: fix compilation with clang
Branches
Unknown
Tags
Unknown