Documentation

Unity Engine

Download Unity

Unity Engine

Dispose()

Releases the stream.
Read time 1 minuteLast updated 4 hours ago

Definition

public void Dispose()

Remarks

For a stream created with AnimationStream.Create, 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
.