# Dispose()

> Dispose of any allocated memory. This must be called if any targets are returned otherwise memory leaks will occur.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

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