react-native-fast-image: Memory Leak on iOS: FastImage not released from memory when callbacks onLoad is set
An engineer at my company noticed a memory leak on iOS when the props onLoad is set on iOS.
FastImage doesn’t get released when it should be.
After investigating the source code, I found out that using a strong reference to self to call sendOnLoad in sd_setImageWithURL.
I suspect this line to be the cause of this memory leaks.
I can submit a Pull Request to transform this strong reference into a weak reference, which should fix the memory leak.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 17 (8 by maintainers)
I would be happy if people could try my PR #433. It should fix the memory leak on iOS.
Let me know if it works for you or not ?
I made a new Pull Request here https://github.com/DylanVann/react-native-fast-image/pull/433
@truongluong1314520 You can set the
onErrorbut just don’t try to get any parameters from it.onErrordon’t pass any parameters.For instance do
but don’t