actionscript 3 - How to get the memory size of an ArrayCollection in Flex -


I have created an image cache, which has an array of images, I have created the functionality so that the maximum amount in the cache is 250 Can be images. However, images can be of a different size, so it would be better to limit the total memory size of all the images in ArrayCollection.

Does anyone know how I can get the total memory size of an ArrayCollection without loop without all the objects in ArrayCollection?

I'm not sure that you can do my advice based on ArrayCollection (say, ImageCacheCollection) A new collection class keeps track of the archive the current memory size and its memory limit before adding an image to the collection, you make sure that Memory limit will not exceed If it is not, then you should compile the collection of the current memory size Switch to image file adding process to add size.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -