How to save iPad memory if I use the same image many times?
hi,
Bear with me if this question has been asked before.
I have an app that has over 270 buttons, and for simplicity of explanation, I assign pretty much the same button image as the background for these 270 buttons in IB. The size of the button image is only 16KB.
The Activity Monitor in Instruments shows the iPad memory usage of my app to close to 80MB, and I would imagine the 270 buttons would have contributed a significant portion to the memory load. I have checked to ensure there are no memory leaks.
My understanding is that currently, the same button image is loaded 270 times into memory (correct me if I'm wrong).
My question is - is there a way to load the button image only once in memory, and reuse it 270 times for each of the 270 buttons? ie, all 270 buttons share the same memory location. I do not do any image manipulation, and the image is used as a background.
Thanks for any inputs.
|