Memory usage does not go down. Help with Memory Leak

@bpran:

Your problem is memory leaks right?
Why not try my suggestion to remove the event listener when you leave the scene?
(line 86)

And line 108 , storyboard.removeScene doesn’t work on active scene.

[lua]local prior_scene = storyboard.getPrevious()
storyboard.purgeScene( prior_scene )[/lua]

Thanks for the reply.

John [import]uid: 186198 topic_id: 32700 reply_id: 130087[/import]

you can call storyboard.removeScene(“nextscenename”)

before calling storyboard.gotoScene(“nextscenename”)

[import]uid: 19626 topic_id: 32700 reply_id: 130089[/import]

Try some friendly people here

http://developer.coronalabs.com/forum/2010/11/18/unofficial-corona-developer-channel-corona-ircfreenodenet [import]uid: 31508 topic_id: 32700 reply_id: 130100[/import]

@bpran:

Well, I was able to remove the event listeners. That shaved off some memory! Still looking for more stuff to shave off. Thanks for the suggestion!

@robmiracle:

So I remove it before calling it? I’ll try that out. Thank you for the suggestion!

John [import]uid: 186198 topic_id: 32700 reply_id: 130091[/import]

Try some friendly people here

http://developer.coronalabs.com/forum/2010/11/18/unofficial-corona-developer-channel-corona-ircfreenodenet [import]uid: 31508 topic_id: 32700 reply_id: 130100[/import]

How about widget buttons, is there some special way of removing their event listeners?

Like for instance:

[lua]local classicButton = widget.newButton{
label = “Classic”,
font = “HelveticaNeue”,
fontSize = 20,
default = “images/menu/menuButton_unpressed.png”,
over = “images/menu/menuButton_pressed.png”,
width = 154,
height = 40,
onRelease = onButtonRelease
}
classicButton.x = _W / 3; classicButton.y = _H / 2
view:insert(classicButton);[/lua]

John [import]uid: 186198 topic_id: 32700 reply_id: 130097[/import]

How about widget buttons, is there some special way of removing their event listeners?

Like for instance:

[lua]local classicButton = widget.newButton{
label = “Classic”,
font = “HelveticaNeue”,
fontSize = 20,
default = “images/menu/menuButton_unpressed.png”,
over = “images/menu/menuButton_pressed.png”,
width = 154,
height = 40,
onRelease = onButtonRelease
}
classicButton.x = _W / 3; classicButton.y = _H / 2
view:insert(classicButton);[/lua]

John [import]uid: 186198 topic_id: 32700 reply_id: 130097[/import]