Skip to content

Commit d1e9892

Browse files
mattleibowCopilot
andcommitted
fix: dispose loadedAnimation native resource in Blazor Lottie sample
Skottie.Animation wraps a native resource (inherits SKObject/IDisposable). The previous DisposeAsync cancelled and awaited the loop task and disposed the CTS, but never disposed loadedAnimation, leaking native memory on every page navigation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9e33405 commit d1e9892

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

samples/SkiaSharpDemo.Blazor/Pages/Lottie.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,6 @@
180180
catch (Exception) { }
181181
}
182182
animationCts?.Dispose();
183+
loadedAnimation?.Dispose();
183184
}
184185
}

0 commit comments

Comments
 (0)