Fix memleaks in unittests

Authored by kfunk on Oct 22 2018, 6:37 AM.

Description

Fix memleaks in unittests

Summary:
Fix memory leaks in unittests to make it easier to find real memory leaks in the tested code.

Fixed tests:

  • test_projectmodel
  • test_areaoperation
  • test_controller
  • test_toolviewtoolbar
  • test_viewactivation
NOTE: this does not fix all memory leaks in all unittests, this is just s start to keep the changes small

Test Plan:

  • cmake -DCMAKE_BUILD_TYPE=Debug -DECM_ENABLE_SANITIZERS='address' -DBUILD_TESTING=ON ..
  • make test

Many tests will fail because of LSAN (leak sanitizer), which is enabled (at least here) by default with ASAN.

Reviewers: KDevelop, kfunk

Reviewed By: KDevelop, kfunk

Subscribers: brauch, kfunk, kdevelop-devel

Tags: KDevelop

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

Details

Committed
kfunkOct 22 2018, 6:37 AM
Reviewer
KDevelop
Differential Revision
D16064: Fix memleaks in unittests
Parents
R32:2bb9401ffe4b: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown