Documentation

Unity Engine

Download Unity

Unity Engine

Dispose()

Releases this reference to the blob data.
Read time 1 minuteLast updated 5 hours ago

Definition

public void Dispose()

Remarks

After you call this method, BlobObjectReference<T>.IsValid is
false
for this copy and you must not use pointers or references to the BlobObjectReference<T>.Value that you obtained from it. This method is thread safe.
Copies of the struct share the same underlying reference, and disposing one copy doesn't invalidate the others. Dispose only one copy of each reference, and use BlobObjectReference<T>.Clone to get an independent one.
Disposing a default reference has no effect. Calling this method again on the same variable also has no effect. If safety checks are enabled, disposing a copy after you dispose a different copy of the same reference throws an
ObjectDisposedException
.