---
title: Dispose()
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/animationstream/dispose
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/animationstream/dispose.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:19:23.772Z
locale: en-us
---

# Dispose()

> Releases the stream.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

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

### Remarks

For a stream created with [AnimationStream.Create](/engine/7000.0/script-reference/unity/animations/animationstream/create.md), this method frees the buffer. Copies of the stream share the buffer, so call this method on only one copy. For any other stream, this method resets only the copy that you call it on to a default stream. It doesn't touch the memory that the stream points to. If you call it on a default stream, it has no effect. A stream that owned its buffer is also a default stream after you dispose it. If safety checks are enabled and you call this method on it again, it throws an `ObjectDisposedException`.
