From RAD Studio API Documentation
Jump to: navigation, search


property CacheSize: Word read GetCacheSize write SetCacheSize;


__property System::Word CacheSize = {read=GetCacheSize, write=SetCacheSize, nodefault};


Type Visibility Source Unit Parent
property public
FMX.ImgList TCustomImageList


Indicates the maximum number of images that can be stored in the internal cache of the current TCustomImageList object.

If the cache is full and you add into cache a new image, the oldest added to the cache image is automatically deleted. If an image loaded into the cache image changes, then it is automatically removed from the cache.

If the specified CacheSize value is less than the current number of images in the cache, then oldest images (inserted into the cache) are deleted from the cache (until the number of images in the cache becomes equal to the specified CacheSize value).

You can increase the cache size to improve the load time of images at run time. For example, if you make the cache size equal to the number of images that the image list contains, the image list loads all images into memory when you instantiate the image list.

However, increasing the cache size increases memory usage, and very high values may also increase the initialization time of the form that loads the image list for the first time. If you want to reduce the memory usage of the image list, decrease the cache size instead.

See Also