[fpc-pascal] Dynamic arrays using management operators

Ryan Joseph ryan at thealchemistguild.com
Mon Jun 4 12:30:27 CEST 2018



> On Jun 4, 2018, at 4:39 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> The array is private. This means that the reference count will be 0 or 1.

I looked at the examples on the wiki and think by private you mean that the ref count does indeed need to be a pointer so it gets updated for all references. I didn’t get that until just now. Since there’s already an array for the elements I guess just allocate all members of the record into a single block of the memory with the elements on the end. Thanks for pointing that out, I’ll fix it later.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list