D - C APIs and D Classes
- Fractal (4/4) Apr 19 2009 Hello
- Simen Kjaeraas (6/10) Apr 20 2009 Greetings.
Hello Save and retrieve a class pointer in a C API is valid? or, the GC will move the class memory and the stored pointer become invalid? Thanks
Apr 19 2009
Fractal wrote:Hello Save and retrieve a class pointer in a C API is valid? or, the GC will move the class memory and the stored pointer become invalid? ThanksGreetings. This newsgroup is deprecated. It is suggested you use digitalmars.D or digitalmars.D.learn instaed. As for your question, D does not have a moving garbage collector, so as long as the instance is alive, its location does not change. So yes, you can allow C functions to store your D pointers. -- Simen
Apr 20 2009