Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sun Feb 15 12:29:58 CET 2004

On Fri, 13 Feb 2004, Charl van Jaarsveldt wrote:

> Hi all,
> According to the docs for TObjectList, if it's OwnsObjects property is 
> set to true, then, if you clear the list, it will automatically call 
> free for all the objects contained in the list. At least that is how I 
> understand it.
> Now, I did a little test program and found that calling 
> TObjectList.clear actually does not call free for each object in the 
> list. If I run through the list and call free for each list manually it 
> works fine though.
> So, here is the question: Is this normal behaviour? If so, when 
> precisely is the list elements going to be freed then? Must it always be 
> freed manually?
> I guess this is a problem I have with a couple of things in the FCL/VCL, 
> so an answer to this will be greatly appreciated! :-)

I have committed a fix in the 1.9.X RTL.


More information about the fpc-pascal mailing list