> On Dec 21, 2023, at 12:06 PM, Hairy Pixels <generic...@gmail.com> wrote:
> 
> Here's another example of this. If I use an array Finalize is called 4 times 
> but  Initialize is never called, unless you assign  a record to the array and 
> then it's called once.
> 
> This makes even less sense. What's the idea behind this behavior? I would 
> expect the calls to balanced as this feature is intended for reference 
> counting I thought.

I had some time to think about this more and I think it does make sense 
actually. Initializing each element wouldn't make sense because there was no 
assignment made but if an assignment were made it would need to finalize but 
during compile time there's no way to know which elements were assigned to.

Regards,
Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to