Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.184 Beiträge
Delphi 12 Athens
|
Re: Procedure / Function sauber beenden
31. Jan 2010, 11:21
Dieses Try-Finaly heißt zu deutsch soviel wie "Resourcenschutzblock"
Delphi-Quellcode:
O := TMyObject.Create;
try
// mach was
finally
O.Free;
end;
Delphi-Quellcode:
M := GetMem(100);
try
// mach was
finally
FreeMem(M);
end;
$2B or not $2B
|