[fpc-pascal] Managed record questions

Sven Barth pascaldragon at googlemail.com
Thu Mar 8 11:38:58 CET 2018

Am 08.03.2018 08:33 schrieb "Maciej Izak" <hnb.code at gmail.com>:

No, this doesn't beg the question, because Object Pascal classes are
> designed in the principle to reduce on the heap. Changing this would not
> only mean quite some changes in the compiler/RTL with no real gain, but it
> would also change a core aspect of the Object Pascal language.

classes with auto free has a lot of sense (without modifying classes design
related to usage of heap), anyway old modes should stay untouched, and the
new feature should have no negative influence on performance for RTL and
Object Pascal. Because of legacy of all FPC modes the topic is a little
complicated but IMO is possible to achieve (for such feature new mode
should be introduced [and maybe modeswitch]).

I have no problem with adding a solution for automatic freeing (like ARC),
my problem here was the stack vs. heap point.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180308/fa7520ad/attachment.html>

More information about the fpc-pascal mailing list