mallocForeignPtr vs. C

John Meacham john at repetae.net
Mon Jul 12 21:54:10 EDT 2010


Hi, is a StablePtr what you are after? 

http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Foreign-StablePtr.html

you can pass a stableptr to the foreignptr to C and it won't be freed
until you explicitly get rid of the stableptr (and all haskell
references are gone)

        John
-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/


More information about the Glasgow-haskell-users mailing list