Destructors, deallocateAll, and GCAllocator

Brian Schott via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 24 12:25:12 PDT 2015


I've discovered that several allocators in 
std.experimental.allocator call deallocateAll on their parent 
allocators during their destructors. This is not a problem unless 
the parent allocator happens to be GCAllocator and the original 
destructor call was caused by a GC collection. GC.free cannot be 
called while the GC is active. (The resulting 
InvalidMemoryOperationError is why DCD 0.7.0 final isn't out 
today) Any ideas how this problem should be solved?


More information about the Digitalmars-d mailing list