Seeker.StartPath Allocating Memory

So I’m getting small amounts of memory allocations each time seeker.StartPath is called, like 40 bytes or so I believe. My understanding was that the Path objects are supposed to be pooled, so is there something else that is causing allocations? Perhaps that it’s using delegates? Except I’m not passing in a delegate to the StartPath method, it’s assigned to the Seeker.pathCallback.

Hi

That’s due to the allocation of the NNConstraint object (path.nnConstraint). I have been trying to figure out a way to get rid of it for some time, but it’s hard to do without breaking compatibility or making the code slower (it’s too large to make into a struct and structs do not support inheritance).