April 25, 2004 [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
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply