FFI transfer ownership instead of cloning #2325
Labels
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
Optimization
Something isn't working as well as it should
Inside ffi/derive/src/arg.rs when receiving input parameters to functions, every opaque structure is cloned so as not to deal with ownership transfer. In FFI calls best practice dictates that memory should be deallocated on the side of the FFI that allocated it. Cloning doesn't seem optimal and, if possible, some form of ownership transfer should replace it
The text was updated successfully, but these errors were encountered: