Clearing Group

Hello, I’ve been using Corona trial (version 7 something) and I’ve recently upgraded to pro. I’ve been trying the app on the latest stable release (version 840) and the texture memory doesn’t seem to be clearing anymore. Is there something that I missed on the memory management part?

Basically, group:removeSelf and group = nil don’t seem to be working anything anymore. The memory keeps rising as I switch between scenes (using storyboard).

Basically, I got something like this:

function scene:createScene( event )
local group = self.view

background = display.newImageRect( “background.png”, display.contentWidth, display.contentHeight )
background:setReferencePoint( display.TopLeftReferencePoint )
background.x, background.y = 0, 0
group:insert(background)

–other code

end

function scene:enterScene( event )
local group = self.view
end

function scene:exitScene( event )
local group = self.view
storyboard.purgeScene(“scene1”)
end

function scene:destroyScene( event )
local group = self.view
group:removeSelf()
group = nil
end

I’ve actually managed to clear the memory by removing the background individually like background:removeSelf() but the problem is that this way clears the background without the fade out transition when I switch scene using storyboard.gotoScene(“scene2”,“fade”,500). [import]uid: 168107 topic_id: 29362 reply_id: 329362[/import]

You don’t need to remove group in destroyScene. When storyboard purges the scene it will clean up it’s memory correctly.

Go to the blog link above and read this week’s post about how Storyboard manages memory.
[import]uid: 19626 topic_id: 29362 reply_id: 118015[/import]

I see. I wasn’t using group:removeSelf() before with the trial version. The problem I’m having is that purge doesn’t seem to be clearing either. [import]uid: 168107 topic_id: 29362 reply_id: 118020[/import]