[Lazarus] RE : RE : RE : RE : RE : RE : Console App Development

Martin lazarus at mfriebe.de
Mon Aug 15 13:33:30 CEST 2011


On 15/08/2011 12:15, Ludo Brands wrote:
>> The gutterimages should be freed. otherwise they would have
>> to show as
>> leak at the exit. or they are a leak in the widgetset, in which case
>> heaptrc may not notice.
>> Try a small app with just an image list. add images, then destroy the
>> image list. And see if qt leaks.
>>
> In a previous message I already mentioned that I wrote a small test app
> exactly doing that: all memory was returned to the OS. Of course the memory
> wouldn't be scattered as it would be in lazarus.
> The fact that the memory used by gutter images doesn't grow after
> unload/load cycles does indicate that "somebody" holds on to it but reuses
> it. Remember I use cmem now, so it probably isn't the memory manager.
>

Still curious what might hold n to it... See my other mail about the 
strings for the text/line data


The imagelist is a private field, and destroyed.

As for the images itself, I can't see how anything could hold on to them 
AD re-use them. That would mean to detect, if the same image is added again.
Of course if image are loaded from resources, that may be possible, but 
IIRc the images in question are drawn on the canvas, by synedit => so 
unless something compares the image pixel by pixel....

just puzzled.






More information about the Lazarus mailing list