www.digitalmars.com         C & C++   DMDScript  

D - [BUG] nesting dtors hangs

Does calling delete from within a destructor hang on linux for anyone? For
example:

class A {
  ~this() { printf("in A delete\n"); }
}
class B {
  A a;
  this() { a = new A(); }
  ~this() { printf("in B delete\n"); delete a; }
}
int main() {
  B b = new B();
  delete b;
  printf("done\n");
  return 0;
}

only prints "in B delete". Compiling with gdc is ok. I might have hosed my
dmd install with all the phobos recompiling I've been doing.
thanks,
-Ben
Apr 24 2004