Skip to content

Commit

Permalink
fix memory allocation bug in 'Mesh to Strokes' tool
Browse files Browse the repository at this point in the history
We forgot to free some of the NativeArrays after the jobs
  • Loading branch information
eeropomell committed Dec 16, 2024
1 parent 04f2250 commit 1e77952
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UnitySDK/Assets/TiltBrush/Scripts/Editor/EditorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ private static async Task Mesh2Stroke(GameObject obj)
originalTriangles = originalTriangles
}.Schedule(strokeIDs.Count, 1).Complete();


originalTriangles.Dispose();
nativeStrokeIDs.Dispose();
nativeUV3.Dispose();

int strokeIndex = 0;
foreach (float strokeID in strokeIDs)
{
Expand Down

0 comments on commit 1e77952

Please sign in to comment.