-
Notifications
You must be signed in to change notification settings - Fork 498
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
Threads not closed #14
Comments
Right, threads are not closed. They're cached to serve more requests. They will be killed when application is killed. I don't think they consume any reasonable amount of memory so I would not bother about that. It's a thread pool, you don't want to start a new one for every image, you want them to be cached. |
Ahh, I see your argument ;) It's just that I had an application with a number of activities using the image loader and so ended up with about 50 threads :P |
ImageLoader should be only one per application. This way memory cache is most effective. |
Ahh, how do you suggest I get around my problem of having it in many different activites. I have a selection of lists, galleries and image views using the class. Btw, do you want to move this to stack overflow? |
Yes, just have only one instance of ImageLoader. You can place it to Application class of make it static member of any other class. |
Ahh I see. I'm not working on this project for a month or two, but when I get round to it, I'll tell you how it's gone. Thanks! |
Hi,
According to the DDMS tool, the ImageLoader doesn't close the threads in the thread pool for the executorService.
This is a rather large memory issue is it not?
The text was updated successfully, but these errors were encountered: