Browse Source

Missing disposes in terrain/Tile

trethaller 5 years ago
parent
commit
43df442504
1 changed files with 8 additions and 0 deletions
  1. 8 0
      hrt/prefab/terrain/Tile.hx

+ 8 - 0
hrt/prefab/terrain/Tile.hx

@@ -53,6 +53,14 @@ class Tile extends h3d.scene.Mesh {
 			surfaceWeightArray.dispose();
 		if( bigPrim != null )
 			bigPrim.dispose();
+		if(packedWeightMapPixel != null)
+			packedWeightMapPixel.dispose();
+		if(indexMapPixels != null)
+			indexMapPixels.dispose();
+		if(heightmapPixels != null)
+			heightmapPixels.dispose();
+		normalTangentBytes = null;
+
 	}
 
 	function set_heightMap( v ) {