Thread-leak?

Hamish Rodda rodda at kde.org
Mon Feb 16 21:01:50 UTC 2009


On Tuesday 17 February 2009 06:02:34 Peter Oberndorfer wrote:
> On Sonntag 15 Februar 2009, Hamish Rodda wrote:
> > On Monday 16 February 2009 08:59:05 Milian Wolff wrote:
> > > Just curious: Could there be something like a thread-leak? I just
> > > closed kdevelop after like 2-3h of work and this was outputted:
> > >
> > > QThreadStorage: Thread 0x90bbd98 exited after QThreadStorage 2147483532
> > > destroyed
> > >
> > > But not once or like 4-8 times like the other times. No: 191 times!
> >
> > No, this is a bug in katepart, each editor creates a qthreadstorage, but
> > when I used it i didn't realise you can't delete it.  I have to remove
> > that code (been lazy).  It's not a kdevelop problem.
>
> Hmm i do not understand what you mean here by remove that code.
> Wouldn't something like the attached patch be enough to fix the leak?
> At least it does not emit any messages here anymore and valgrind is silent
> too.
>
> (not sure if the virtual destructor in KateLayoutCache is needed since
> QObject makes the destructor virtual already)
>
> If it is OK i can commit it.

No, the object may have values from other threads too.  I'll just revert it to 
what it was before I used qthreadstorage.

Cheers,
Hamish.




More information about the KDevelop-devel mailing list