[fpc-pascal] Class vs Object type

Sven Barth pascaldragon at googlemail.com
Wed Apr 6 14:21:48 CEST 2016


Am 06.04.2016 14:06 schrieb "Tomas Hajny" <XHajT03 at hajny.biz>:
>
> On Wed, April 6, 2016 13:26, Michael Van Canneyt wrote:
> > On Wed, 6 Apr 2016, Graeme Geldenhuys wrote:
>
> Hi,
>
> >> I use Class and Object data types frequently in my code. I like the
fact
> >> that Object data types can be used without first instantiating an
> >> instance and it gets freed automatically.
>  .
>  .
> > 1. Classes are automatically zeroed out. That's an advantage.
>
> True. Note that objects descended from TObject are automatically zeroed
> out as well as soon as one calls the constructor Init.

Just for clarification (cause I first thought wrong as well): this means
the TObject object from unit Objects, instead of the class TObject.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160406/106c323b/attachment.html>


More information about the fpc-pascal mailing list