Couldn’t find this documented anywhere, so…
Is it necessary to keep the NativeArray around after passing it to CombineDependencies(nativeArray)? Can I call Dispose() on the array right after combining all the job handles into a single one?
I mean, will this explode in some way?:
NativeArray<JobHandle> deps = new NativeArray<JobHandle>(5 ,Allocator.TempJob, NativeArrayOptions.UninitializedMemory);
// fill the array with handles here
JobHandle combined = JobHandle.CombineDependencies(deps);
deps.Dispose();
// use combined JobHandle here