Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
how to delete elements from memory — Gideros Forum

how to delete elements from memory

somlasomla Member
edited July 2013 in General questions
Hi
I would like to make an app.
This app contain a lot of image and sound

my question is that
How can i delete element from the memory?
Can I load image when I show it?
Then i delete from memory?

Thanks for help.
Sorry my bad English.

Comments

  • OZAppsOZApps Guru
    edited July 2013
    -- LOAD AND DISPLAY IMAGE
    local imageHandle = Bitmap.new(Texture.new("imagefile.png"))
    stage:addChild(imageHandle) --> Show item on screen
     
     
    -- HIDE AND DELETE IMAGE
    stage:removeChild(imageHandle) --> Remove from screen
    collectgarbage("collect")
    Hope that helps you
    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
  • somlasomla Member
    edited July 2013
    i found the answer

    collectgarbage

    Thanks
Sign In or Register to comment.