No leak detection warnings/errors seem to show up at all for me, and I’ve tried triggering it with both TempJob and Persistent memory undisposed. I have no idea where to even look to figure out what is going on. I’m actually unsure if it ever worked after I’ve upgraded from ECS 0.50 to 1.0.0-pre.15. (I’ve put off tracking down any leaks for a few weeks since the upgrade).
And I have noticed that the settings move to the preferences window.
Any one with similar issues?
1 Like
The “Leak Detection Level” native leak tracking was broken sadly and has not been fixed in the engine until 2022.2.14f1. However, with the engine side fix this requires a fix in the com.unity.collections package which we will release with our next release of DOTS packages. This tracking will allow for leaks to be reported when the domain reloads and they displayed in the console and Editor.log. If you have stack traces enabled, the full trace of where the memory was allocated will be displayed as well for each allocation made using UnsafeUtililty.MallocTracked
(all containers in collections and entities use this path when allocating with Allocator.Persistent. Allocating with Allocator.Temp cannot leak with how it’s designed – it frees itself each frame)
For leak tracking of Allocator.TempJob
, there is a diagnostic switch you can enable in the Preferences > Diagnostics > Core > Job Temp Memory Leak Validation. This specific option will require an editor restart however. Leaks will be reported in the Editor.log and as Info in the console.
Hope this helps!
Kev
11 Likes