# Dispose()

> Destroys the NavMeshQuery and deallocates all memory used by it.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Experimental.AI](/engine/6000.7/script-reference/unityengine/experimental/ai.md)
* **Assembly:** UnityEngine.AIModule

> **Warning:**
>
> **Deprecated.** The experimental NavMeshQuery struct has been deprecated. Use NavWorld instead.

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