Hello
I am developing an app with Scene Graph where more than one scene is shown.
Each screen is abstracted to a controller and each controller presents its own Scene, like this example:
' Create the splash screen'
m.screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
m.screen.setMessagePort(m.port)
' Create the component'
m.scene = m.screen.CreateScene("splash")
m.screen.show()
When i present another screen, i repeat the same process.
It all works fine.
What i notice though is that when i debug with
sgnodes all
It will tell me that previous Scenes are still there. I am worried this is a memory issue.
I tried removing each Scene individually with
scene.Close() before presenting a new one but i get the error
BRIGHTSCRIPT: ERROR: roSGScreen: create screen interrupted.: pkg:/source/controllers/....
What is the best way to remove all nodes in a Scene before presenting a new one?
Thanks,