You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I've missed this in the documentation, but I didn't realize that storing ocaml::Value somewhere outside of #[ocaml::func] will lead to crashes after OCaml GC disposes the value.
After adding this to my function, things started to work:
let handler = ocaml::Value::from(handler.raw().0);
Perhaps ocaml::Value should be provided with custom Clone implementation that ensures that cloned value is properly rooted.
The text was updated successfully, but these errors were encountered:
Maybe I've missed this in the documentation, but I didn't realize that storing
ocaml::Value
somewhere outside of#[ocaml::func]
will lead to crashes after OCaml GC disposes the value.After adding this to my function, things started to work:
Perhaps
ocaml::Value
should be provided with customClone
implementation that ensures that cloned value is properly rooted.The text was updated successfully, but these errors were encountered: