D7291: pimcommon: autocorrectionwidget - QPointer guard dialogs
Denis Kurz
noreply at phabricator.kde.org
Tue Aug 15 09:54:28 BST 2017
dkurz added a comment.
Objects that live on the stack should not be subject to heap memory management; something that definitively hasn't changed. Memory management in Qt is already quite confusing. This change supports local reasoning about the code. This easily outweighs the micro performance hit.
As one consequence, the destructor of a dialog is called twice if this dialog's parent is deleted before exec returns when QPointer is not used, as anthonyfieroni pointed out in his edit. This is bound to cause trouble.
fwiw: +1 for this diff
REPOSITORY
R95 PIM: Common Support
REVISION DETAIL
https://phabricator.kde.org/D7291
To: winterz, #kde_pim
Cc: dkurz, anthonyfieroni, #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170815/8d6323af/attachment.html>
More information about the kde-pim
mailing list