How right implement Rust struct and methods as Vec from C without memory leaking?


#1

I’m writing Rust bindings for a C library which use a embedded constructor and destructor. And I cannot implement struct of array and elements of array with correct lifetimes, property of array (or Vec, slice), with destructor. Details on StackOverflow. I will rewrite question here if it needed.