D14931: Eliminate duplicate QMaps in OutputWidget

Vyacheslav Korneev noreply at phabricator.kde.org
Thu Aug 23 20:39:56 BST 2018


vkorneev added a comment.


  In D14931#314200 <https://phabricator.kde.org/D14931#314200>, @kfunk wrote:
  
  > Thanks for your change even if you were not happy about it.
  >
  > So what do you think? To me that is easier to follow, and gives very few chances for accidental leaks. One should use smart pointers more often these days.
  
  
  You're welcome :) And no, I'm quite happy with the way it is now too.
  
  Now, talking about memory leaks - I tried to check this after your previous comment and, as far I understood, we'll get no memory leaks here even without destroy() with raw pointers, because both proxy model and view have parents and will be deleted by them. But yes, if somebody changes the code and removes the parent unintentionally, that will lead to memory leak, so you're right that the chances of such scenario are reduced now.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D14931

To: vkorneev, #kdevelop
Cc: kfunk, pino, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180823/4b4c5bb4/attachment.html>


More information about the KDevelop-devel mailing list