[fpc-devel] Managed Types, Undefined Bhaviour

Sven Barth pascaldragon at googlemail.com
Sat Jun 30 08:47:49 CEST 2018


Willibald Krenn <Willibald.Krenn at gmx.at> schrieb am Sa., 30. Juni 2018,
08:01:

>  TBH, I didn't know this issue existed in Delphi and I've done my share of
> Delphi over time. I still maintain that for managed types the compiler is
> responsible for some minimal initialization (like it's done for records
> etc, no?).
>

The variables we're talking about here *are* initialized. They contain
valid values and none of the internal RTL routines will crash when used
with them. Everyone however expects result variables of those to be
initialized to Nil and that is simply *not* a guaranteed given.
Also records only initialize their managed fields. All others are left as
garbage.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180630/fcdb52f3/attachment.html>


More information about the fpc-devel mailing list