Einzelnen Beitrag anzeigen

Benutzerbild von Lemmy1
Lemmy1

Registriert seit: 28. Nov 2004
Ort: Ismaning
184 Beiträge
 
Delphi 2006 Professional
 
#8

Re: Guter Stil oder 'Wie programmiere ich vernünftig?'

  Alt 19. Apr 2006, 00:14
Ein Blick in Borland.Delphi.System bringt übrigens auch etwas Klarheit dahin, was .Free eigentlich bewirkt:

Delphi-Quellcode:
procedure TObjectHelper.Free;
var
  FreeNotify: IFreeNotify;
begin
  if (Self <> nil) and (Self is IDisposable) then
  begin
    // ... snip ... (copyrighted high-tech code)
    (Self as IDisposable).Dispose;
  end;
end;
Daniel
www.nemu.com - The N64 Emulator
  Mit Zitat antworten Zitat