Le 04/10/2011 10:52, Walter Bright a écrit :
Allocate an object, then cast it to immutable, and pass it to another thread.
That is explicitly said to be unsafe on D's website. As long as a reference exist in the creating thread, this should work, but if thoses references disapears, you'll end up with memory corruption.
This is why the type system is made for isn't it ? And if you decide to do funky stuff bypassing it, unsafe things can happen.