Kingfisher icon indicating copy to clipboard operation
Kingfisher copied to clipboard

AnimationImageView images资源某几帧被释放

Open SevenWangMr opened this issue 3 years ago • 2 comments

Check List

Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

Issue Description

场景:tableviewcell中,tableview刷新频率比较高,cell也有几率被移除。

[Tell us about the issue]

Reproduce

[The steps to reproduce this issue. What is the url you were trying to load, where did you put your code, etc.]

Other Comment

[Add anything else here]

SevenWangMr avatar Sep 30 '21 05:09 SevenWangMr

其他cell内的相同gif有正常显示,在某一次刷新出现了currentAnimatedFrame中的image为空了 现在我只能修改了currentAnimatedFrame的判断,防止崩溃,但是具体原因却没有找到 请各位大佬帮忙分析一下 animatedFrames[previousFrameIndex] = animatedFrames[previousFrameIndex]?.placeholderFrame preloadIndexes(start: currentFrameIndex).forEach { index in guard let currentAnimatedFrame = animatedFrames[index] else { return } if !currentAnimatedFrame.isPlaceholder { return } animatedFrames[index] = currentAnimatedFrame.makeAnimatedFrame(image: loadFrame(at: index)) }

SevenWangMr avatar Sep 30 '21 06:09 SevenWangMr

我也遇到了

Resoulte avatar Sep 30 '21 06:09 Resoulte