[fpc-devel] Feature request/discussion - SetLengthNoInit

Ryan Joseph genericptr at gmail.com
Thu Sep 17 04:08:00 CEST 2020

> On Sep 16, 2020, at 9:10 PM, J. Gareth Moreton via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
> I figure I could design a dynamic array class, but it will very likely be incompatible with SetLength no matter what I try to do, and unless I'm mistaken, it won't have the benefit of automatically gaining an implicit clean-up blocl if used as a local variable unless there's an automatic reference counting feature that I'm not aware of.

There are operators to do this now but they're only for records (https://wiki.freepascal.org/management_operators). You can easily make a reference counted type now but as I mentioned that are some drawbacks, some of which I'd like to correct if the compiler team allowed it.

	Ryan Joseph

More information about the fpc-devel mailing list