Fixes minor memory leaks
ClosedPublic

Authored by hallas on Mar 9 2019, 3:46 PM.

Details

Summary

Fixes a few minor memory leaks found with address sanitizer.
The newTabButton and closeTabButton was not passed a parent and is not
deleted in the destructor of TabbedViewContainer which will cause them
to be leaked when closing a tab. Instead pass the TabbedViewContainer as
the parent.
The same goes for the profileMenu, it was not passed a parent pointer at
contruction and the setMenu function doesn't take ownership of it, so
therefore it was also leaked.

Test Plan

Compile konsole with address sanitizer.
Open and close konsole.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hallas created this revision.Mar 9 2019, 3:46 PM
Restricted Application added a project: Konsole. · View Herald TranscriptMar 9 2019, 3:46 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
hallas requested review of this revision.Mar 9 2019, 3:46 PM

Thanks, an entire new tab/session code is getting committed to master once the 19.04 split is done next week. I'll wait until than to check your patches.

https://phabricator.kde.org/D17643

hallas updated this revision to Diff 54946.Mar 27 2019, 6:15 PM

Rebased the commit and fixed a few other minor leaks introduced by the new split view code.

hindenburg accepted this revision.Mar 28 2019, 1:14 PM

Thanks a lot

This revision is now accepted and ready to land.Mar 28 2019, 1:14 PM
This revision was automatically updated to reflect the committed changes.

i also backported the original diff to 19.04