1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- { %opt=-Sen -vn }
- program notusedbug;
- {$mode objfpc}{$H+}
- uses
- Classes, SysUtils
- { add your units here };
-
- type
- TA = class
- private
- FC: integer;
- end;
-
- { TB }
- TB = class
- private FA: TA;
- public
- constructor Create;
- destructor Destroy; override;
- end;
- { TB }
- constructor TB.Create;
- begin
- FA := TA.Create;
- FA.FC := 4;
- writeln(FA.FC);
- end;
- destructor TB.Destroy;
- begin
- FA.Free;
- inherited Destroy;
- end;
- var
- b: TB;
- begin
- b := TB.Create;
- b.Free;
- end.
|