Thema: Delphi Array of XY löschen

Einzelnen Beitrag anzeigen

Benutzerbild von s.h.a.r.k
s.h.a.r.k

Registriert seit: 26. Mai 2004
3.159 Beiträge
 
#3

AW: Array of XY löschen

  Alt 27. Aug 2012, 14:36
Delphi-Quellcode:
var
   A : array of Byte;
begin
  SetLength(A, 1000);
  SetLength(A, 0);
  Writeln(Assigned(A)); // Liefert: FALSE

  SetLength(A, 1000);
  A := nil;
  Writeln(Assigned(A)); // Liefert: FALSE
end.
Ausgehend davon, würde ich sagen ja.
»Remember, the future maintainer is the person you should be writing code for, not the compiler.« (Nick Hodges)
  Mit Zitat antworten Zitat