mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[as3] Fixed memory leak in Triangulator
This commit is contained in:
parent
fdf6aba634
commit
11b402fcaf
Binary file not shown.
@ -175,6 +175,9 @@ package spine {
|
||||
if (polygon.length > 0) {
|
||||
convexPolygons.push(polygon);
|
||||
convexPolygonsIndices.push(polygonIndices);
|
||||
} else {
|
||||
polygonPool.free(polygon);
|
||||
polygonIndicesPool.free(polygonIndices);
|
||||
}
|
||||
polygon = Vector.<Number>(this.polygonPool.obtain());
|
||||
polygon.length = 0;
|
||||
@ -250,6 +253,9 @@ package spine {
|
||||
if (polygon.length == 0) {
|
||||
convexPolygons.splice(i, 1);
|
||||
this.polygonPool.free(polygon);
|
||||
polygonIndices = convexPolygonsIndices[i];
|
||||
convexPolygonsIndices.splice(i, 1);
|
||||
this.polygonIndicesPool.free(polygonIndices);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user