Bulat Ziganshin wrote:
Wednesday, May 24, 2006, 2:08:10 PM, you wrote:
fptr <- newForeignPtr fin nullPtr
return (Mem bufRef ... fptr)
I hope you surround each use of the actual Ptr with 'withForeignPtr'?
If so, I imagine this is safe.
no, i hope that fptr's finalizers will be no e
Bulat Ziganshin wrote:
my program uses datastructure that contains plain Ptr, this Ptr points
to the memory area allocated by 'malloc':
createRawMemBuf size = do
buf<- mallocBytes (fromIntegral size)
bufRef <- newURef buf
...
return (Mem bufRef ...)
i need to free this memo