Hi all.
I tried a few things about recycling here in the forum but nothing very clear and explained.
what is the right way to use multiple images in a ImageView?
for example
i want to show a imageview where i will load around 50+ images with size 600x600 or more.
1 - the recycle its the correct function on this case?
What should I do to load all those images without memory crash or any other type of crash?
as I think it is
- Open app
- Show image on imageview
- Use recycle to clear the image
- show another image on imageview
- Use recycle to clear the image
- show another image on imageview
- Use recycle to clear the image
- show another image on imageview
.....
2 - this is correct to avoid crash?
3 - what the exacty time i need to use the recycle?
after loading an image in a ImageView
or when i want change the image of imageview for another image.
4 - this code its correct?
Dim jo = imageview.bitmap As JavaObject
jo.RunMethod("recycle", Null)
i m working on app like a tinder, where i will load pictures every click, I need to avoid as much memory crash.
I really appreciate if someone can explain me.
thank you.
ps: i dont know if recycle its the right function to help me on this case.
thx