diff --git a/os/src/batch.rs b/os/src/batch.rs index f2a0d649..816e8b78 100644 --- a/os/src/batch.rs +++ b/os/src/batch.rs @@ -116,6 +116,8 @@ pub fn run_next_app() -> ! { } app_manager.move_to_next_app(); drop(app_manager); + // before this we have to drop local variables related to resources manually + // and release the resources extern "C" { fn __restore(cx_addr: usize); } unsafe { __restore(KERNEL_STACK.push_context(