[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


Hi,

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
later.

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