February 25, 2015 Make GC.free a no-op during a collection cycle? | ||||
|---|---|---|---|---|
| ||||
Several discussions (including the recent one on RCSlice) mentioned the fact that calling GC.free inside a destructor may lead to double freeing of memory. One simple solution is to simply have GC.free return immediately if called inside a collection. Nothing good could come of the call anyway. Would this work? Any impediments? Andrei | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply