GC.addRange in pure function

Per Nordlöw per.nordlow at gmail.com
Fri Feb 12 12:17:13 UTC 2021


On Tuesday, 9 February 2021 at 03:05:10 UTC, frame wrote:
> 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?

Would making

`new T[]` inject a call to `GC.addRange` based on `T` (and maybe 
also T's attributes)

be a step forward?


More information about the Digitalmars-d-learn mailing list