pub fn memory_teardown(&mut self, memory_idx: u32) -> Result<(), UserError> {
		match self.memories.get_mut(memory_idx as usize) {
			None => Err(UserError("Trying to teardown a non-existent sandboxed memory")),
			Some(None) => Err(UserError("Double teardown of a sandboxed memory")),
			Some(memory) => {
				*memory = None;
				Ok(())
			}
		}
	}
/// Tear down the memory at the specified index.
///
/// # Errors
///
/// Returns `Err` if `memory_idx` isn't a valid index of an memory or
/// if it has been torn down.
Tear down the memory at the specified index.
Tear down the memory at the specified index .
pub fn memory_teardown(&mut self, memory_idx: u32) -> Result<(), UserError> {
		match self.memories.get_mut(memory_idx as usize) {
			None => Err(UserError("Trying to teardown a non-existent sandboxed memory")),
			Some(None) => Err(UserError("Double teardown of a sandboxed memory")),
			Some(memory) => {
				*memory = None;
				Ok(())
			}
		}
	}
pub fn memory_teardown ( & mut self , memory_idx : u32 ) -> Result < ( ) , UserError > { match self . memories . get_mut ( memory_idx as usize ) { None => Err ( UserError ( " " ) ) , Some ( None ) => Err ( UserError ( " " ) ) , Some ( memory ) => { * memory = None ; Ok ( ( ) ) } } }
Tear down the memory at the specified index.
Tear down the memory at the specified index .
&mut self
memory_idx
u32
&mut self
memory_idx
u32
errors
Returns `Err` if `memory_idx` isn't a valid index of an memory or
if it has been torn down.
Returns ` Err ` if ` memory_idx ` isn ' t a valid index of an memory or if it has been torn down .