[Issue 19119] App crashes with strange behavior of ctors/dtors from CPP

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 27 05:27:25 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19119

--- Comment #3 from Manu <turkeyman at gmail.com> ---
I never tested the new extern(C++) work with the GC.

destroy() knows how to destroy a C++ class because it knows the argument type,
but the GC collect doesn't know the type, and can't know the memory is a C++
class and how to destroy it properly.

I'm not sure what options are possible in this case.

I reckon, if you're using C++ classes, use C++ allocation strategies.

--


More information about the Digitalmars-d-bugs mailing list