# unloadModel static method

void unloadModel(

1. FaceModel faceModel,
2. ProcessingUnit processingUnit

)

Unloads a model from memory.

param faceModel The AI model to be unloaded. param processingUnit The processing unit used for the model. throws FaceException An error has occurred during Face Library execution.

## Implementation

    static void unloadModel(FaceModel faceModel, ProcessingUnit processingUnit) {
      var err = faceSDK.id3FaceLibrary_UnloadModel(faceModel.value, processingUnit.value);
      if (err != FaceError.success.value) {
        throw FaceException(err);
      }
    }