Skip to content

Commit f36f901

Browse files
committed
feat(api): Mark release_model as unsafe
1 parent 85ad4ad commit f36f901

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/interpreter.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ impl Interpreter {
256256
}
257257

258258
/// Release the model file buffer
259-
pub fn release_model(&mut self) {
259+
/// # Safety
260+
/// This function is marked unsafe since it's not clear what the safety guarantees are right
261+
/// now. With a simple test it caused a segfault so it's marked unsafe
262+
pub unsafe fn release_model(&mut self) {
260263
unsafe { mnn_sys::Interpreter_releaseModel(self.inner) }
261264
}
262265

0 commit comments

Comments
 (0)