In my project, I create an image control. I also have a button tha开发者_如何学JAVAt, when clicked removes the image.
I set the url of the image to null, and set the image control itself to null. However, not all memory of the Image control is released. If I add more Image controls, my project will be very prone to run out of memory.
- When I start the app: memory usage = 5.218Kb
- When I remove the image control: memory usage = 5.416Kb
How does one release the memory / cache when the control has been removed or loaded again? How can I manage the application's memory?
Not sure, if this is still actual, but try this: Image downloader with auto memory cleaning. Sample project here: https://simca.codeplex.com/
精彩评论