I’m currently working on a project that requires quite heavy calculations. I ended up using Unity’s job system and Burst compiler because of the great performance compared to other alternatives (I do not use ECS, just the job system and burst compiler).
I use Coroutines to be able to await the job completion over multible frames.
yield return new WaitUntil(() => jobHandle.IsCompleted);
I made sure that no memory leaks could occur while the game is running.
However, if the game is closed while a job is running, the Coroutine is not able to finish and the NativeArrays are not going to be disposed.
Is this going to cause problems or is this irrelevant as the application is closing anyways?