Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the errorListener method disposed after the CachedNetworkImage is disposed? #951

Open
limonadev opened this issue Jun 12, 2024 · 0 comments

Comments

@limonadev
Copy link

💬 Questions and Help

I'm implementing a custom logging mechanism when the image loading fails. I found the errorListener really useful to get that info, but after some performance testing I noticed the callback from errorListener gets called even if the CachedNetworkImage widget gets disposed.

I took a look at the code and wasn't able to find a place where the method removeListener was used, except from testing files.

I'm asking this, because it seems like the regular Image.network widget from Flutter does call the removeListener method. If the method is not being called in this package, is there any reason to not do it? Is it safe from memory leaks?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant