We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 534d2c8 commit d366abdCopy full SHA for d366abd
packages/skia/src/external/reanimated/useAnimatedImageValue.ts
@@ -40,10 +40,11 @@ export const useAnimatedImageValue = (
40
41
// Update the current frame
42
animatedImage.decodeNextFrame();
43
- if (currentFrame.value) {
44
- currentFrame.value.dispose();
45
- }
+ const oldFrame = currentFrame.value;
46
currentFrame.value = animatedImage.getCurrentFrame();
+ if (oldFrame) {
+ oldFrame.dispose();
47
+ }
48
49
// Update the last timestamp
50
lastTimestamp.value = timestamp;
0 commit comments