HI all,
If i create "wordClass". like so:
wordClass = Word.new()
Then within "Word" i start a Listener....
self:addEventListener(Event.ENTER_FRAME, Word.onEnterFrame, self)
If then do this again...
wordClass = Word.new()
Does it kill off the first Listener ? or would making wordClass = nil remove the Listener.
Comments
However if it was a C variant, then if you allocate an object
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Likes: SinisterSoft
http://artleeapps.com/
Bubble Adventure - Colors
https://deluxepixel.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
What if make an"onExitBegin" for the removal.
does this get run, if i set the Variable to NIL ?
http://artleeapps.com/
Bubble Adventure - Colors
From a CS type focus where every thing that is allocated needs to be deallocated and dereferenced, etc, that might not be such a good idea. However maybe for what you are doing, perhaps your solution is exactly what you need.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps