DUContext memory leak
David Nolden
david.nolden.kdevelop at art-master.de
Fri Jun 12 17:52:36 UTC 2009
Am Freitag 12 Juni 2009 18:19:05 schrieb Peter Oberndorfer:
> 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?
Both patches are fine. The unused constructor was ment to be used once, but
then I discarded the use again, so it's good to delete it.
Thanks and feel free to commit.
More information about the KDevelop-devel
mailing list