I'm using this scene manager github.com/gideros/Scene-Manager and I was wondering how other people are dealing with making sure objects are cleaned up? Does this call any type of destroy function? Or are you handling it manually?
Hi, from my understanding lua garbage collector cleans up everything that is no longer referenced, and scene manager does its part removing the "old" scene (https://github.com/gideros/Scene-Manager/blob/master/scenemanager.lua#L345) ; however it may happen to mistakenly leave some reference to an object, making it impossible to be removed.
Comments
from my understanding lua garbage collector cleans up everything that is no longer referenced, and scene manager does its part removing the "old" scene (https://github.com/gideros/Scene-Manager/blob/master/scenemanager.lua#L345) ; however it may happen to mistakenly leave some reference to an object, making it impossible to be removed.
If that happens you should notice a memory leak, this post could be useful:
http://giderosmobile.com/forum/discussion/comment/20239#Comment_20239
http://www.giderosmobile.com/forum/discussion/comment/9441#Comment_9441