[fpc-pascal] Constructors & Destructors 101

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Apr 3 17:01:06 CEST 2009


On 03 Apr 2009, at 16:21, Bart wrote:

> So if i understand correctly:
>
> Say I have
>
> Type
> TFoo = class;
> private
>   fSomeField: Integer;
> public
>   constructor Create;
> end;
>
> then
>
> constructor  TFoo.Create
> begin
> Inherited Create;
> fSomeField := -1;
> end;
>
> would in essence be equal to
>
> constructor  TFoo.Create
> begin
> fSomeField := -1;
> end;
>
> Since TOblect.Create "does nothing".

Yes.


Jonas



More information about the fpc-pascal mailing list