Skip to content

Commit 2d175f4

Browse files
authored
add logs when freeing string or rust runtime (viamrobotics#4)
1 parent ccb4fa2 commit 2d175f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ffi/dial_ffi.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ pub unsafe extern "C" fn free_string(s: *mut c_char) {
229229
if s.is_null() {
230230
return;
231231
}
232+
log::debug!("freeing string: {s:?}");
232233
let _ = CString::from_raw(s);
233234
}
234235

@@ -255,5 +256,6 @@ pub extern "C" fn free_rust_runtime(rt_ptr: Option<Box<DialFfi>>) -> i32 {
255256
}
256257
None => {}
257258
}
259+
log::debug!("Freeing rust runtime");
258260
0
259261
}

0 commit comments

Comments
 (0)