FeepingCreature:
> On 13.07.2010 12:28, ABothe wrote:
> > So there isn't any other method than calling C's free(); or malloc
> > (); ?
> 
> That's how it is.

But you can build some abstraction by yourself, for example inside a struct you 
can keep the pointer to a memory block in the C heap, and in the ~this() of the 
struct you can put the free(). Then D has to give you a way to disallow the 
"new" on this struct, to be sure its destructor is called when it goes out of 
scope (or the object it's contained into gets deallocated).

Bye,
bearophile

Reply via email to