[Haskell-cafe] FFI Query: How to free a CString allocated in Haskell

Verma Anurag-VNF673 Anurag.Verma at motorola.com
Tue Apr 29 01:45:16 EDT 2008


Peter,
A naïve question I have now after reading your mail. How do I call MarshallAlloc.free from my C code because that's where I need to free it? 

Anurag

> So no, using C's free is not the right thing to do. It will probably  
> work in the real world, but you should try to use Haskell's free if  
> possible.

cheers
peter


More information about the Haskell-Cafe mailing list