is it safe to call `GC.removeRange` in dtor?
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 30 08:31:15 PDT 2015
On 6/27/15 5:53 PM, ketmar wrote:
> is it safe to call `GC.removeRange` in dtor? i believe it should be safe,
> so one can perform various cleanups, but documentation says nothing about
> guarantees.
Hm... I can't see any reason why it wouldn't be allowed. removeRange
shouldn't allocate, so the one forbidden thing is not used.
And removing a range, by definition, means it's not being collected. So
you can be assured that the data still exists.
I'm not 100% sure, though.
-Steve
More information about the Digitalmars-d-learn
mailing list