1 2 3 4 5 6 7 8 9 10 11
//!Common FFI utilities #[inline] ///Frees memory for T pub unsafe fn free_boxed<T>(ptr: *mut T) { if ptr.is_null() { return; } drop(Box::from_raw(ptr)); }
1 2 3 4 5 6 7 8 9 10 11
//!Common FFI utilities #[inline] ///Frees memory for T pub unsafe fn free_boxed<T>(ptr: *mut T) { if ptr.is_null() { return; } drop(Box::from_raw(ptr)); }