mallocForeignPtr vs. C
Edward Z. Yang
ezyang at MIT.EDU
Tue Jul 13 16:32:03 EDT 2010
Excerpts from Axel Simon's message of Tue Jul 13 16:28:29 -0400 2010:
> Well, if the C code hangs on to the StablePtr that wraps the
> ForeignPtr, its finalizer won't be run. But can run again once the
> StablePtr is freed. So you can take out the Ptr in the ForeignPtr and
> use it in C land as long as C holds on to the StablePtr.
That's what I thought, just making sure.
It occurs to me that there might be a long term memory leak here.
Cheers,
Edward
More information about the Glasgow-haskell-users
mailing list