Consider the code from issue 20650: class Foo { ~this() { new int; } } void main() { new Foo; } This runs into core.exception.InvalidMemoryOperationError@src/core/exception.d(647): Invalid memory operation . The reason is that the GC may not be invoked during finalizers, ie. when destructors are run. There is almost never a reason to do this; however, this should still be documented in the language spec at https://dlang.org/spec/class.html#destructors .
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/3982 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB