how is the memory optimized for images (internally by Corona)?

I’m talking about the following case:

I want to draw the same image on many places for one frame.
I’ve created lots of display:newImage objects with the same image.

Is this the right method to do it?
Does this mean that all the images, using the same png file, will have shared memory for the bitmap in the memory?

Thank you,
Danail [import]uid: 57961 topic_id: 14357 reply_id: 314357[/import]

I think the answer is yes, multiple items created with the same image will use shared memory.

The reason I’m saying this is because I have used to code from this link:

http://developer.anscamobile.com/code/texture-memory-monitor

When I create 10 objects with the same image, the report from that code shows the first object using memory and then reports 0 memory used for the other nine.

That code is very useful if you can integrate it into your app. It will help you to check that you are cleaning everything up correctly.

[import]uid: 67839 topic_id: 14357 reply_id: 53119[/import]