On Thursday, 4 May 2017 at 19:50, Serge Sivkov wrote:
> How can I protect struct handler and fhandler function pointer from garbage 
> collection?

I recently struggled with this on test code aswell. One thing that seems to 
work quite well is to store them in a toplevel  reference. 

let fhandler = ref fhandler 

Best,

Daniel


_______________________________________________
Ctypes mailing list
[email protected]
http://lists.ocaml.org/listinfo/ctypes

Reply via email to