# Cleanup()

> Use this function to release resources allocated by the ObjectPreview implementation.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public virtual void Cleanup()
```

### Remarks

When overriding this function be sure to include a base.Cleanup to avoid errors.
