synchronized (this[.classinfo]) in druntime and phobos
Sean Kelly
sean at invisibleduck.org
Wed Jun 6 09:58:34 PDT 2012
On Jun 3, 2012, at 5:24 PM, Alex Rønne Petersen wrote:
>
> The monitor in obj.__monitor is actually allocated on the native C heap, and, in some cases, leaked... one of the many reasons I want it gone.
The benefit of it being on the native C heap is that you can use synchronized{} in the object's dtor. You can't do this if the monitor is on the GC heap, as Mutex is.
More information about the Digitalmars-d
mailing list