# Dispose()

> Dispose the Painter2D object and free its internal unmanaged resources.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

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