Re:Rust FFI: Sending strings to the outside world
by thayne on Thursday May 18, 2017 @12:21AM
(#14364788)
It might be good to mention how to free the memory. By passing the pointer back to a rust function like
Also the `into_raw` method on CString gives you a pointer while simultaneously taking ownership of the CString, so mem::forget isn't necessary if you use `into_raw` rather than `as_ptr`.
[ Parent
| on HN ]
There are no comments on this comment yet.