[Differential] [Request, 48 lines] D2602: Fix possible memory leaks and dangling pointers
dkurz (Denis Kurz)
noreply at phabricator.kde.org
Sat Aug 27 11:21:44 BST 2016
dkurz created this revision.
dkurz added a reviewer: KDE PIM.
dkurz set the repository for this revision to rKDEPIM KDE PIM.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.
REVISION SUMMARY
Instead of just assuming that all subwidgets were deleted, we use
guarded pointers and check afterwards. We also assert that these
pointers do not hold references to still existing widgets before
re-assigning to them. This way, we also cannot forget to reset one
of these pointers these pointers to nullptr, as it happened for
the mFolderTreeWidget pointer. This might be related to
bugs 367779 and 367836.
TEST PLAN
Compile, run, play around extensively with re-layouting of the KMMainWidget, switching between long and short folder lists etc. This revealed the parent-of-mFavoriteModel issue btw ;)
REPOSITORY
rKDEPIM KDE PIM
REVISION DETAIL
https://phabricator.kde.org/D2602
AFFECTED FILES
kmail/src/kmmainwidget.cpp
kmail/src/kmmainwidget.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: dkurz, #kde_pim
Cc: kde-pim, spencerb, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20160827/3cdfde30/attachment.html>
More information about the kde-pim
mailing list