public static void processRemoveVariableInstruction(ExecutionContext ec,String varname) throws DMLRuntimeException {
  Data input1_data=ec.removeVariable(varname);
  if (input1_data == null)   throw new DMLRuntimeException("Unexpected error: could not find a data object for variable name:" + varname + ", while processing rmvar instruction.");
  if (input1_data instanceof MatrixObject) {
    ec.cleanupMatrixObject((MatrixObject)input1_data);
  }
}

public static void processRemoveVariableInstruction ( ExecutionContext ec , String varname ) throws DMLRuntimeException { Data input1_data = ec . removeVariable ( varname ) ; if ( input1_data == null ) throw new DMLRuntimeException ( "Unexpected error: could not find a data object for variable name:" + varname + ", while processing rmvar instruction." ) ; if ( input1_data instanceof MatrixObject ) { ec . cleanupMatrixObject ( ( MatrixObject ) input1_data ) ; } }
remove variable instruction externalized as a static function in order to allow various cleanup procedures to use the same codepath as the actual rmvar instruction
