Matlab, Rust.
not be exactly the same as Rust’s. We therefore shouldn’t return the pointer directly, but should rather return a pointer to the pointer. We can do this by putting the pointer into a Box, and return the pointer to the Box content. This prevents MATLAB from trying to take over the memory management.