I noticed that BCH in bchlib/src/lib.rs calls ffi::init_bch(..), but it doesn't seem to have a destructor that would call the corresponding ffi::free_bch(..) when the object leaves scope. I tried implementing Drop for this struct, but oddly enough I'm getting an invalid pointer from free() on multiple systems.
I noticed that
BCH
in bchlib/src/lib.rs callsffi::init_bch(..)
, but it doesn't seem to have a destructor that would call the correspondingffi::free_bch(..)
when the object leaves scope. I tried implementingDrop
for this struct, but oddly enough I'm getting aninvalid pointer
fromfree()
on multiple systems.