[fpc-devel] Customer Done procedure for dynamic arrays

Jonas Maebe jonas.maebe at elis.ugent.be
Fri May 28 18:05:40 CEST 2010


On 28 May 2010, at 17:47, Andrew Brunner wrote:

> Under windows I just executed the same code that worked under linux
> but crashed under windows.
> 
> TInt64Array=Array of Int64;
> 
> procedure Done(var List:TInt64Array);
> begin
>  Finalize(List);
> end;
> 
> procedure Empty(var List:TInt64Array);
> begin
>  SetLength(List,0);
> end;
> 
> In the above case the two procedures worked under linux.  Under
> Windows Done crashes.  Is this a bug that needs to be reported or is
> the memory manager performing different under Linux than under
> Windows.

Both should work and have the same effect, afaik. So please report a bug.


Jonas



More information about the fpc-devel mailing list