[fpc-devel] (ref types / circles) Re: Defer keyword
Nikolai Zhubr
n-a-zhubr at yandex.ru
Fri May 7 02:54:40 CEST 2021
Hi Martin,
07.05.2021 2:41, Martin Frb via fpc-devel:
> On 07/05/2021 01:36, Nikolai Zhubr via fpc-devel wrote:
>>
>> Indeed. However, unfortunately classes are substantially different in
>> that they can cause reference circles,
> You can already cause ref circles, no classes needed.
Yes, records and objects are the same as classes in this respect. You
cannot do circles with any other types, AFAIK.
Regards,
Nikolai
> type
> TR = record
> a: array of TR;
> end;
>
> var
> x: TR;
> begin
> SetLength(x.a,99);
> x.a[0] := x;
> end.
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list