Where does 4 frames old alloc warning come from?

Hi, Im seeing a pair of these warning per frame, any chance I can find out where they are coming from? There is no further information in the console. I tried full stacktraces (both in leak detection and playersettings), but to no avail. Im on 2019.1.2 with latest packages.

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

Cheers, Bas

Well known issue. Read through the following thread (if spam filter allows), see if anything works. If not, I just toggle off warnings. Hasnt caused anything wrong so far if I restart Unity Editor after every play session.

Spam filter eats the link. Google: [Jobs][Lags] JobTempAlloc has allocations that are more than 4 frames old

1 Like

Make sure you’re definitely calling m_YourNativeArray.Dispose() when you’re done with whatever you need it for. For me this happens when I have an undisposed native array lying around.

Worse, someone correct me if this is wrong but if you start up a NativeArray, cause an exception, fix the issue to dispose it properly in your code, then try again - the previous array can still be floating around until the project is reloaded.

Still new to this stuff myself but this has solved my problems a few times, good luck!

1 Like