Skip to content

Commit 76dcfc6

Browse files
authored
Merge pull request #55 from btsai-dev/memleak-fix
Fixed some Texture2D memory leak issues
2 parents d495efa + 899c57a commit 76dcfc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/Scripts/Importing/ImageSequenceImporter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private Vector2Int GetImageDimensions(string path)
102102
x = texture.width,
103103
y = texture.height
104104
};
105-
105+
Texture2D.DestroyImmediate(texture);
106106
return dimensions;
107107
}
108108

@@ -144,7 +144,7 @@ private int[] FillSequentialData(Vector3Int dimensions, List<string> paths)
144144

145145
data.AddRange(imageData);
146146
}
147-
147+
Texture2D.DestroyImmediate(texture);
148148
return data.ToArray();
149149
}
150150

0 commit comments

Comments
 (0)