objpas.inc 849 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2011 by Jonas Maebe
  4. member of the Free Pascal development team.
  5. This file implements the helper routines for TObject
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************
  12. }
  13. procedure TObject.Free;
  14. begin
  15. if not DestructorCalled then
  16. begin
  17. DestructorCalled:=true;
  18. Destroy;
  19. end;
  20. end;
  21. destructor TObject.Destroy;
  22. begin
  23. end;
  24. procedure TObject.Finalize;
  25. begin
  26. Free;
  27. end;