I'm not very experienced with Lua, so I have a question about Creating a Group and
how to unload with Gideros. I know how to create a Group and upload with Corona.
Corona example:
-- Main menu screen
-- Create menu group
local menuGroup = display.newGroup()
-- Display menu screen
local menuBG = display.newImageRect("menu.png", 480, 320)
menuGroup:insert(menuBG)
-- New game button
newGameBTN = display.newImageRect("newgameBtn.png", 270, 36)
menuGroup:insert(newGameBTN)
-- Settings button
settingsBTN = display.newImageRect("settingsBtn.png", 270, 36)
menuGroup:insert(settingsBTN)
-- Statistics button
statisticsBTN = display.newImageRect("statsBtn.png", 270, 36)
menuGroup:insert(statisticsBTN)
-- When I'm ready to unload the main menu I use this:
display.remove(menuGroup); menuGroup = nil |
Also is there a way to monitor Memory with Gideros like the cose below?-- local monitorMem = function()
-- collectgarbage()
-- print( "\nMemUsage: " .. collectgarbage("count") )
-- local textMem = system.getInfo( "textureMemoryUsed" ) / 1000000
-- print( "TexMem: " .. textMem )
-- end
-- Runtime:addEventListener( "enterFrame", monitorMem ) |
Comments
You can use Sprites to group your display objects like:
Currently, it's not possible to get the used texture memory but you can get the memory that Lua allocates:
Thank atilim!