D9120: Fix a memory leak

Michael Pyne noreply at phabricator.kde.org
Sun Dec 3 16:52:15 UTC 2017


mpyne added a comment.


  I think `~KuitStaticData()` *does* delete domainSetups.  But deleting that QHash doesn't delete the underlying values.  That means the real leak is at "Kuit::setupForDomain(QByteArray const&) (kuitmarkup.cpp:504)".
  
  If that's the case, then adding a destructor to the `KuitStaticData` class (along lines of `~KuitStaticData() { qDeleteAll(domainSetups); }`) should also clear up the leak, and do so in a safer fashion without trampling on a shared static object.

REPOSITORY
  R249 KI18n

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

To: jtamate, #frameworks
Cc: mpyne, anthonyfieroni, aacid, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171203/0718ca73/attachment.html>


More information about the Kde-frameworks-devel mailing list