# Dispose()

> Dispose must be called to shutdown the PhotoCapture instance.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windows.WebCam](/engine/6000.7/script-reference/unityengine/windows/webcam.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public void Dispose()
```

### Remarks

If your PhotoCapture instance successfully called [PhotoCapture.StartPhotoModeAsync](/engine/6000.7/script-reference/unityengine/windows/webcam/photocapture/startphotomodeasync.md), you must make sure that you call [PhotoCapture.StopPhotoModeAsync](/engine/6000.7/script-reference/unityengine/windows/webcam/photocapture/stopphotomodeasync.md) before disposing your PhotoCapture instance.
