[Haskell-cafe] About pointer taken by C lib in FFI.

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Sat Jan 12 06:16:54 UTC 2019


Say I have some data, and `poke` into a Ptr. Then I pass the Ptr to
some function in C lib. The C lib stores the Ptr somewhere to use

My question is, how does GHC handle the finalizing of the Ptr? Does it
track the "used by foreign lib"?


And for G+, please use magiclouds#gmail.com.

More information about the Haskell-Cafe mailing list