This GC model also seems to work fine for locally-allocated __gshared objects. Since they're registered locally but available globally, they'll be collected once the thread that created it is gone.

Also, when an object is cast(shared) before being sent to another thread, it's usually still in scope once the other thread returns.

So there seems to be some very thin chances that existing code will be broken with a thread-local GC.

Reply via email to