[fpc-pascal] For ..in GetEnumerator Allocation

Ryan Joseph ryan at thealchemistguild.com
Wed Oct 4 16:52:26 CEST 2017


> On Oct 4, 2017, at 5:19 PM, Marco van de Voort <marcov at stack.nl> wrote:
> 
> Yup, or a record.  See e.g. http://www.stack.nl/~marcov/lightcontainers.zip

This seems like the simplest more efficient method. Does FPC just know it’s a record internally and not try to dealloc it? GetEnumerator seems like a magic method so I’m not sure how the memory is being managed but I assume the stack space for the method return value is reserved and I just fill in the values of the record to that location.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list