Question about Storyboard clearing objects

Newbie questions about Storyboard and purge scene vs remove scene

I create several objects (in the Storyboard group of course) over the course of a game level, then I move to a new scene using storyboard.gotoScene(“nextround”, “slideDown”, 1000)

in the next level I remove the previous scene:

    local prior_scene = storyboard.getPrevious()        – remove last scene

    if prior_scene ~= nil then 

        print(“next round - enterscene:  remove previous scene”)

        storyboard.removeScene( prior_scene ) 

    end

Is that all that’s necessary?  I don’t need to remove the objects in the previous level and nil them, if I’ve added them to the display group used by storyboard it will take care of the memory clean up / freeing?

Thanks for the help!

That is correct, as long as you put it in the “group” for the scene, purge scene will remove them for you.

Rob

fantastic - thanks!

That is correct, as long as you put it in the “group” for the scene, purge scene will remove them for you.

Rob

fantastic - thanks!