On Tue, 19 May 2015 19:16:14 -0400, Adam D. Ruppe <destructiona...@gmail.com> wrote:

On Tuesday, 19 May 2015 at 23:10:21 UTC, bitwise wrote:
....which is why I am asking if there are any plans to implement something like @nogc for entire modules or classes.

At the top:

@nogc:
<stuff here>

Gotta do it inside the class too i think.


Thanks!

this seems to work too:

@nogc {
   <stuff>
}


I think this is still a problem though:

struct StackThing { ~this() { writeln("where am I?"); } }

class HeapThing{
    StackThing thing;
}

HeapThing thing = new HeapThing();

Basically, I can't design a struct and be sure the destructor will be called on the same thread as where it went out of scope.

I hope I'm wrong and DIP74 comes soon =/

  Bit

Reply via email to