You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I would like to thank Nicklockwood for publishing this work. extremely helpful and well put together. I have noticed the repository has not been updated for quite a while but still, I'll try to post this in an attempt to get some kind of help.
I've come across a memory consumption issue when using UIImages as my return view in viewForItemAt.
I have an image index and I am returning a UIImageVIew for each call of the method. If reuse view is available, I'll use it instead. So with the help of counters I can see that iCarousel creates 60 new views at first and then always reuses them. So how come my memory consumption goes through the roof ?
Your memory consumption is probably due to the images rather than the views.
It looks like you are storing UIImages in an array so each time you display an image for the first time, iOS will decode the image (which requires much more memory per image than the compressed image size) and then keep it indefinitely.
I suggest you take a look at some of the image-based examples in the iCarousel Examples folder, which use more advanced image caching strategies.
Hi,
I would like to thank Nicklockwood for publishing this work. extremely helpful and well put together. I have noticed the repository has not been updated for quite a while but still, I'll try to post this in an attempt to get some kind of help.
I've come across a memory consumption issue when using UIImages as my return view in viewForItemAt.
I have an image index and I am returning a UIImageVIew for each call of the method. If reuse view is available, I'll use it instead. So with the help of counters I can see that iCarousel creates 60 new views at first and then always reuses them. So how come my memory consumption goes through the roof ?
Here is my viewForItemAt:
I should add that "imageView" is a class property
Thank you!
The text was updated successfully, but these errors were encountered: