Matlab, Rust.
those assumptions is the pointers that get returned are created by C, and in this case, that assumption is wrong. From the documentation on the into_raw method of CString: pub fn into_raw(self) -> *mut i8 Consumes the CString and transfers ownership of the string to a C caller. The pointer which