iShapeUnity / Triangulation

Complex polygon triangulation. A fast O(n*log(n)) algorithm based on "Triangulation of monotone polygons". The result can be represented as a Delaunay triangulation.
MIT License
22 stars 3 forks source link

Memory Leak #6

Closed murphkev closed 6 months ago

murphkev commented 6 months ago

Heya,

Looks like you forgot to dispose triangles in Triangulation.cs line 68

Triangles are passed into Delaunnay (lines 77 and 84); but the Delaunnay constructor copies the native array, so they never get disposed.

https://github.com/iShapeUnity/Triangulation/blob/master/Runtime/iShape/Triangulation/Shape/Delaunay/Triangulation.cs

Cheers - great package btw!

NailxSharipov commented 6 months ago

Heya,

Thanks for the heads-up, I agree, it's a leak! Would you be interested in suggesting a fix or submitting a PR? I will appreciate it.

NailxSharipov commented 6 months ago

fixed in 0.0.7