Skip to content

Commit

Permalink
feat(api): Mark release_model as unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Oct 23, 2024
1 parent 85ad4ad commit f36f901
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ impl Interpreter {
}

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

Expand Down

0 comments on commit f36f901

Please sign in to comment.