I'm working on Xamarin iOS project. I have to load the images depends on help menu choice. I have a view controller with UIImageView and every time I'm adding the list of images I have to show a list and showing the Images. It works fine for two or three menu options (times). After few clicks app is crashing due to memory. I tried to clear the List on Close button click even though it is crashing. Can you please help me to resolve this issue.
Thanks in advance
You need to be careful with adding "heavy" resources like images. Rule of thumb:
Keep only in memory what you really need, means: clean up everything that's not in the view port. Use
UICollectionView
orUITableView
, they support dequeueuing reusable cells (see Xamarin docs for more information).For some more information, see here: https://thomasbandt.com/xamarinios-memory-pitfalls