[fpc-pascal] Open array in object constructor gives error

Sven Barth pascaldragon at googlemail.com
Wed Jan 4 14:23:36 CET 2023


Hairy Pixels <genericptr at gmail.com> schrieb am Mi., 4. Jan. 2023, 13:06:

>
>
> > On Jan 4, 2023, at 2:01 PM, Sven Barth <pascaldragon at googlemail.com>
> wrote:
> >
> > For something like that you are better of to use Object Pascal classes
> and override their NewInstance and FreeInstance methods.
> >
>
> What do you mean exactly? You still need to allocate some memory for them
> right so what do you gain?
>

You said in the other mail "there's a global stack", so just return memory
from that stack.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230104/619a86e2/attachment.htm>


More information about the fpc-pascal mailing list