On 08/23/2014 11:34 AM, Dennis Poon wrote:
>
>        8.2.13 Class types
>        <http://www.freepascal.org/docs-html/prog/prog.html#QQ2-212-239>
>
> Just like objects, classes are stored....
>
> Look like it is referring to a TClass instance instead of an TObject
> instance but thanks  a lot for pointing me into the right direction. \

No, it is referring to the difference between
    Type
        TA = Object
        End;

and
    Type
        TB = Class
        End;
   

If you type
   
    Var
           A: TA;
           B: TB;
    Begin
    End;

Then TA is allocated on the stack, whereas TB will be allocated on the
heap once you call TB.Create;


-- 
Ewald

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to