[fpc-devel] Current state of atari port

Karoly Balogh charlie at scenergy.dfmk.hu
Fri Feb 11 03:59:42 CET 2022


Hi,

On Thu, 10 Feb 2022, Sven Barth via fpc-devel wrote:

> Thorsten Otto via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am
> Do., 10. Feb. 2022, 15:47:
>
>>> Cause in the variant you mentioned where would the allocated memory be
>>> stored?
>> I'm not that familiar with ObjectGEM yet, but i think the
>> allocated pointer is stored in some list in the base class.
>
> And how does one work with the created instance? How does one release
> it? Do you have an example for that? 

Remember, this is for GUI stuff. In some cases the code actually uses the
new return pointer, for example when you want to interact with the
recently added GUI element, but sometimes you can just "fire and forget"
it, like injecting an icon. In this case the constructor of the object
adds it to some globally maintained object tree, so it's not lost or
remain dangling. Then you can access it from there with various utility
functions.

This is something quite specific, and I actually wonder if it's a corner
case we don't handle or PurePascal's implementation is less restrictive.

Charlie


More information about the fpc-devel mailing list