digitalmars.D - Destructors
- pragma (8/8) Feb 04 2005 I know it was brought up a while back, but I wanted to check with the gr...
- Ben Hinkle (4/16) Feb 05 2005 correct. A destructor cannot assume any other GC-managed resource is ali...
I know it was brought up a while back, but I wanted to check with the group and make sure that it's still the case. D's destructors are not to be called from within other destructors, correct? (or more succinctly: do not use 'delete' in a dtor) I just ran into an issue where I was using 'delete' down the call chain from a module dtor. It routinely causes a fault in "__d_delclass", according to MSVC's debugger. - EricAnderton at yahoo
Feb 04 2005
"pragma" <pragma_member pathlink.com> wrote in message news:cu1d76$rmi$1 digitaldaemon.com...I know it was brought up a while back, but I wanted to check with the group and make sure that it's still the case. D's destructors are not to be called from within other destructors, correct? (or more succinctly: do not use 'delete' in a dtor) I just ran into an issue where I was using 'delete' down the call chain from a module dtor. It routinely causes a fault in "__d_delclass", according to MSVC's debugger. - EricAnderton at yahoocorrect. A destructor cannot assume any other GC-managed resource is alive. The order in which the memory is reclaimed in a given GC pass is undefined.
Feb 05 2005