GC.addRange in pure function

frame frame86 at live.com
Tue Feb 9 03:05:10 UTC 2021


On Sunday, 7 February 2021 at 14:13:18 UTC, vitamin wrote:
> Why using 'new' is allowed in pure functions but calling 
> GC.addRange or GC.removeRange isn't allowed?

Does 'new' violate the 'pure' paradigm? Pure functions can only 
call pure functions and GC.addRange or GC.removeRange is only 
'nothrow @nogc'.


More information about the Digitalmars-d-learn mailing list