The background is that I’m trying to write a lib in Rust, and to be called from C.
Say I have a struct, and it explicitly implemented Drop trait, which enables it release some resource (say a block of raw memory pointed by a
*mut raw pointer) when itself is finalized. I have a function declared as
pub extern "C", which enables me to call it from the C-side, and this function returns a value of the struct (so that not a pointer).
The question is that If the call in C side responsible of calling the drop function of that struct before this struct goes out of its scope?