A better way to check if the gc is running

bogdan szabobogdan3 at gmail.com
Thu Dec 12 08:56:37 UTC 2019


Hi,

When combining ref counting and GC allocated classes, weird bugs 
might happen. Is it possible to add a new member in 
`core.memory.GC`, like `isCollecting` or `isRunning`, to avoid 
testing if the GC is running, without allocating like this?

https://p0nce.github.io/d-idioms/#GC-proof-resource-class


Thanks,
Bogdan




More information about the Digitalmars-d mailing list