Load new image to existing variable (garbage collection)

Hi everyone,

I am currently writing my first Corona app, and so far it is going well.
I am a bit unsure on one issue though.

If I have a variable which holds an image object.
Then I load a new image object to the existing variable…

Does the old image get collected in garbage, or simply replaced in the memory address used by the variable, or do both now exist in memory?
Do I need to clear the image manually from the main display group every time I load an image to the existing variable?

Thanks,
Dave [import]uid: 3948 topic_id: 333 reply_id: 300333[/import]

The old image will get garbage collected as long as there are no references to it. Which as this case, will get GC

Cheers,

Carlos [import]uid: 24 topic_id: 333 reply_id: 516[/import]

Thanks Carlos.

regards,
Dave [import]uid: 3948 topic_id: 333 reply_id: 517[/import]