[Kde-pim] Grantlee version 0.1.5 now available
Janne Hakonen
joyer83 at live.fi
Mon Aug 30 16:53:59 BST 2010
I'm sorry, but the fix didn't have any effect. Objects created from
ScriptableNodeFactory and ScriptableFilter are not deleted. Or rather, at
least in ScriptableFilter's case they are deleted sometimes. I put
breakpoints to ScriptableFilter's constructor and destructor, the
constructor was hit 184 times and destructor was hit 92 times.
Further investigation:
It looks like the filters are created in two slightly different ways. The
difference is in Parser's constructor where they are created as a result of
calling Engine's loadDefaultLibraries(). They are also created when the
constructor calls Engine's loadLibrary() in a Q_FOREACH loop couple of lines
below.
I'm guessing that when you call loadDefaultLibraries() it loads the
libraries and their filters. The filters are stored as raw pointers into
ScriptableLibraryContainer, and its pointer is returned, but
loadDefaultLibraries() doesn't save it anywhere. <-- who should handle the
filters' deletion in this case?
When a library is loaded in Parser's Q_FOREACH loop, its pointer is passed
to openLibrary() method which then takes the raw filters' pointers and
stores them as QSharedPointers which seems to delete the filters correctly
when they are not needed anymore.
-Janne
--------------------------------------------------
From: "Stephen Kelly" <steveire at gmail.com>
Sent: Sunday, August 29, 2010 9:29 PM
To: <kde-pim at kde.org>
Subject: Re: [Kde-pim] Grantlee version 0.1.5 now available
> Janne Hakonen wrote:
>
>> Thanks! Your change has corrected the memory releasing problem mostly.
>> It's still taking about ~200kB more memory after each template run, but
>> previously it took a bit over 10Mb of memory on each run, so a definite
>> improvement. Frankly, this is already quite acceptable for my needs. :)
>>
>> The leak detector is still showing those leaks, so they might be cause of
>> that small memory take.
>> I've included debug output from my application which includes the
>> detector's report.
>>
>> Janne
>
> Probably fixed now. could you try again?
>
>
>
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list