Re: Suggested patch for Open Dylan's C runtime

Bruce Hoult wrote:

> On 7/31/07, Thomas Christian Chust <chust <at> web.de> wrote:
>
>> Thomas Christian Chust wrote:
>>
>>> Bruce Hoult wrote:
>>>
>>>> You could allocate the list link for the object at the point that you
>>>> register the finalizer for it
>>
>> I guess I shouldn't hack such stuff together when in a hurry. A much
>> easier solution which also avoid allocation inside the finalization
>> procedure is possible by simply using the data argument to that
>> procedure to supply a preallocated cons cell.
> 
> Right. :-)  Looks good provided that link object won't get GC'd in the meantime.

But if that happened, I would consider it a bug in the garbage
collector. I my eyes, being the fixed parameter to a registered callback
fully qualifies an object as being alive.

cu,
Thomas

--

-- 
Gd-hackers mailing list
Gd-hackers <at> gwydiondylan.org
https://www.opendylan.org/mailman/listinfo/gd-hackers


Gmane