digitalmars.D - Make GC.free a no-op during a collection cycle?
- Andrei Alexandrescu (7/7) Feb 25 2015 Several discussions (including the recent one on RCSlice) mentioned the
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
Feb 25 2015