GC Destruction Order

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 21 05:46:12 PDT 2015


On Thursday, 21 May 2015 at 12:33:33 UTC, Steven Schveighoffer 
wrote:
> At this moment, a thread-local-only heap pointer must deal with 
> multi-threading issues simply because destructors can run on 
> another thread, even though the reference is thread-local. The 
> biggest example right now is reference-counted structures such 
> as std.stdio.File.

Just for the record: .net doesn't use reference counting for 
system resources like files, it works fine, such resources 
usually have well-defined ownership.


More information about the Digitalmars-d-learn mailing list