D16064: Fix memleaks in unittests
Kevin Funk
noreply at phabricator.kde.org
Tue Oct 9 10:11:43 BST 2018
kfunk accepted this revision.
kfunk added a comment.
This revision is now accepted and ready to land.
Nice!
Can be committed this way as well, but I'd research using `QScopedPoiner` in some places instead.
INLINE COMMENTS
> test_projectmodel.cpp:325
> +
> + delete subchild;
> + delete child;
Here and below (where you use `delete ...`): Try to use `QScopedPointer` instead of raw pointers -- that way you don't need to cleanup yourself at the end of the block?
And it also cleans up memory even if we bail out at any of the `QCOMPARE` or `QVERIFY` stmts.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D16064
To: buschinski, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181009/be4fc5a2/attachment.html>
More information about the KDevelop-devel
mailing list