dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.
MIT License
1.1k stars 96 forks source link

Possible memory leak fix #123

Closed atkinsa1 closed 3 years ago

atkinsa1 commented 3 years ago

We were getting some leaked objects of type AnyRemoteContent in our app. This PR appears to fix it with no ill effects.

I also spotted that you were loading instead of cancelling when .cancelOnDisappear was set. I assumed this was a mistake, if it was not then I can undo that change.

dmytro-anokhin commented 3 years ago

Hey,

Thank you for noticing, I consider this as two separate issues. The bug with cancelOnDisappear I will fix it right away.

I need more clarification on a memory leak with remoteContent, can you please explain why it happens and how using method helps?

atkinsa1 commented 3 years ago

It looks like I was mistaken with the memory leak fix while trying to recreate it, the cause was elsewhere in the app. I will close this PR now. Thanks!