[fpc-pascal] Free member after inherited Destroy;

Zaher Dirkey parmaja at gmail.com
Sat Apr 13 21:25:06 CEST 2013


Is it safe to free memeber object after call inherited in Destroy?
in Delphi/ObjFPC modes

type TMyObject=class(TObject)
   FMyMember:TmyMemberObject;
....

destructor TMyObject.Destroy;
begin
  inherited Destroy;
  FreeAndNil(FMyMember);
end;


-- 
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130413/f7dff31b/attachment.html>


More information about the fpc-pascal mailing list