Tags: burst, exception, idisposable, native collection
IDisposable is becoming more and more prevalent in Unity. Previously, it was typically only used for I/O types like
FileStream. Now it’s used for in-memory types like
NativeArray<T> to avoid the garbage collector. Needing to call
Dispose manually means we’re explicitly managing memory, just like we’d do in lower-level languages like C++. That comes with some challenges, especially with shared ownership, which we’ll deal with today.
Read the rest of this article »