On 11/14/2012 1:23 AM, Benjamin Thaut wrote:
Could you please give an example where it would break?

Thread 1:
  1. create shared object
  2. pass reference to that object to Thread 2
  3. destroy object

Thread 2:
  1. manipulate that object


And whats the difference between:

struct Value
{
   ~this()
   {
     printf("destroy\n");
   }
}

shared Value v;


and:


shared static ~this()
{
   printf("destory\n");
}

The struct declaration of ~this() has no idea what context it will be used in.

Reply via email to