>> Is there a function that Rezeros the elements of an array ?
>> fillchar(A,SizeOf(A[Low(A)])*Length(A),#0);
> That will not work if the array contains strings or any objects that need
> finalization.
True... It should only be used for primitive types that are not reference-
counted or allocated on the heap...
For dynamic arrays I assume that
var
a :array of String;
begin
setlength(a,2);
a[0] := '1';
a[1] := '2';
setlength(a,0);
setlength(a,2);
end;
does not leave the string hanging around... This of course wouldn't
release TObject instances.
--
Aaron@home
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz