Closed sinoth closed 2 months ago
I've narrowed down the offending code to a single line:
This may be a leak with NativeQueue itself, as was seen in the past. Maybe someone can reason through this better than I can! I tried adjusting the use of the NativeQueue to get rid of the leak to no avail.
edit: Even if the RefineMeshJob::Execute method is lobotomized down to this:
public void Execute()
{
using var _trianglesQueue = new NativeQueue<int>(Allocator.Temp);
}
The leak still happens. So this seems to either be a benign leak due to running Burst jobs in the editor and then domain reloading, or a problem with NativeQueue itself. Interestingly running the job multiple times does not increase the leak count.
Hi @sinoth,
Thank you for your interest and contribution to the BurstTriangulation project! As far as I know, the 'Leak' message is an internal bug of the Unity.Collections
/Unity.Burst
package. I have just added a 'Known Issues' section in the README.md
and mentioned this particular issue.
Best, Andrzej
When RefineMesh = true, upon a domain reload Unity reports a leak. I'm new to Burst so I'm not sure how dire this is, but it only happens when RefineMesh = true and it seems to be a problem internal to the library.
Here is the call stack:
Reproducible with this code:
After running the above function, trigger a domain reload by either changing some code or manually triggering like this: