digitalmars.D.learn - emplacing extern(C++) class
- drug (9/9) Jan 16 2017 I'm interfacing to C++ I using emplacing extern(C++) to malloc'ed memory...
I'm interfacing to C++ I using emplacing extern(C++) to malloc'ed memory like http://wiki.dlang.org/Memory_Management (see Explicit Class Instance Allocation) This code segfaulted with extern(C++) TestClass. I guess it's because extern(C++) class aren't rooted from Object so instead of destroy(obj) (in heapDeallocation) I should use obj.__dtor()? It works, but I'm not expert and so not sure. Could someone confirm or no my thoughts? Thank in advance
Jan 16 2017