<div dir="ltr">I'm wrapping a simple library that contains a few functions that call malloc or realloc internally to allocate a few struct members and I'm wondering how to make those behave with Ctypes and the GC.<div>
<br></div><div>The library exposes structname_free functions where applicable, but I'm not certain how to tell Ctypes how to use them or if I even need to at all.</div><div><br></div><div>I've read through the ctypes examples, tests and other code from onanomsg and ocaml-libnl to no avail.</div>
<div><br></div><div>Anyone mind sharing any tips here?</div><div><br></div><div>thank you</div><div><br></div><div><br></div><div><br></div><div><br></div></div>