Matlab, Rust.
not use the C’s free method, otherwise we will have a memory leak. When we return a pointer to char, MATLAB assumes that this is a null-terminated char array, reads it into a char array, and frees the memory. The catch is that it uses C’s free method, which assumes a certain memory layout that may