ItemRepository bucket memory leak

Aleix Pol aleixpol at kde.org
Fri Jun 12 21:03:32 UTC 2009


You could apply it and comment it or something.

On Fri, Jun 12, 2009 at 11:00 AM, David Nolden <
david.nolden.kdevelop at art-master.de> wrote:

> Am Freitag 12 Juni 2009 18:19:24 schrieb Peter Oberndorfer:
> > Running valgrind on some duchain tests it seems Buckets are leaked in
> > ItemRepository::close()
> >
> > Attached patch should fix this.
> >
> > A question if i understood it correctly:
> > m_fastBuckets is just for being able to access buckets in m_buckets fast
> > without any function call.
> Yes exactly.
>
> Actually I think this patch should better not be applied, even if it is
> correct. The buckets contain the actual data that is used by many different
> items, for example macros or identifiers. ItemRepository::close() is only
> called during application shutdow, and the buckets do not contain any
> meaningful destructors, thus it has no negative side-effects to let them
> leak.
>
> Data that is stored within such buckets is for example permanently held by
> KDevelop::Identifier and KDevelop::QualifiedIdentifier. Deleting the
> buckets
> would mean that from that point on, any use of an Identifier or
> QualifiedIdentifier could lead to a crash during shutdown, depending on the
> shutdown sequence.
>
> Since the shutdown sequence seems to be nearly random, and we've had quite
> a
> few such shutdown sequence problems already, it's probably better to just
> let
> this leak intentionally, and just add a comment describing that problem
> instead of the qDeleteAll.
>
> Greetings, David
>
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090612/37295eeb/attachment.html>


More information about the KDevelop-devel mailing list