iPad - Received Memory Warning


I have an application that when launches, I receive this warning:

2013-11-01 09:08:33.982 name[273:907]
Received memory warning. WARNING →

It also used to crash just after that, until I remove a few things from the scene. Now my concern is that I think its mainly crashing because I have a photo gallery in the application, of hundreds of photos.

Those photos are inserted into the gallery by using

var image : Texture;

So the images are already loaded into the device, right? Meaning it takes up memory?
So I want to know if I can load the images only when the user gets to view the gallery?


Or is my MemoryWarning coming from something else?

It’s late so I don’t know the code off hand but it’s something like (google this): “Resources Unload”. Run that before loading a new photo in your app, and you should see the memory level stay the same. Don’t forget to do it for thumbnails too.