# Cleanup()

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

## Definition

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

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

### Remarks

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