Warn about using the GC
Zoadian
no at no.no
Mon Jan 15 01:40:59 UTC 2024
On Sunday, 14 January 2024 at 19:53:21 UTC, Richard (Rikki)
Andrew Cattermole wrote:
>
>> There is another way, though. In @system code, the gc delegate
>> can be forcibly cast to be @nogc (as far as the type system is
>> concerned - it doesn't change the behavior of the delegate).
yes, that way my idea too, but as tg pointed out to me, the @nogc
function could store the delegate somewhere and another @nogc
would then be able to access it.
you this only works if you can ensure nothing escapes the
function.
More information about the Digitalmars-d
mailing list