D17039: ASAN: Fix leak in KAStatsFavoritesModel

Kevin Funk noreply at phabricator.kde.org
Wed Nov 21 18:01:46 GMT 2018


kfunk added a comment.


  I think the `QSharedPointer` overhead is very much negligible in this case here. And doesn't require refactoring of the original code. This is not performance sensitive code (compared to the costs of the QAIM-modifications), no?
  
  If you think the memory leak can be fixed differently, shoot.

INLINE COMMENTS

> kastatsfavoritesmodel.cpp:297
>  
>          m_itemEntries[resource]
>              = m_itemEntries[entry->id()]

With `std::unique_ptr` we'd run into a couple of problems, like in this place here: Multiple copies would be needed.

REPOSITORY
  R119 Plasma Desktop

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

To: kfunk, davidedmundson, ivan
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181121/c8ed4241/attachment.html>


More information about the Plasma-devel mailing list