DUContext memory leak

Peter Oberndorfer kumbayo84 at arcor.de
Fri Jun 12 16:19:05 UTC 2009


Running valgrind on some duchain tests it seems DUContextDynamicData in
DUContext::m_dynamicData is never freed.

The 2 attached patches fix this.
The first one removes a constructor that seems to be unused.
By removing the constructor we can be sure m_dynamicData was allocated by our
own DUContext instance.

The second patch deletes m_dynamicData in DUContext destructor.

Please review
(are there any plans to use this constructor in the future? correct place for delete?

Thanks,
Greetings Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-delete-m_dynamicData-in-DUContext-destructor.patch
Type: text/x-diff
Size: 855 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090612/fea2c023/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-remove-unused-DUContext-constructor.patch
Type: text/x-diff
Size: 1570 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090612/fea2c023/attachment-0001.bin>


More information about the KDevelop-devel mailing list