on interfacing w/C++

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 16 17:26:33 PDT 2014


"John Colvin"  wrote in message news:qbwxwxekffpegmbckejx at forum.dlang.org...

> Which, if you did, would enable you to use C++ classes from D somewhat 
> transparently, no?

Potentially, yes.  You'd need to be very careful that there was always a 
gc-visible reference to the class to keep it alive, so no using malloc for 
arrays of class pointers etc in the C++ code.  This is done in DDMD by using 
a wrapper which forwards to GC.malloc. 



More information about the Digitalmars-d mailing list