Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Quick question on classes — Gideros Forum

Quick question on classes

amaximovamaximov Member
edited April 2013 in General questions
I am using classes for my app and I have a quick question. I have a class called bullet which I can call using Bullet.new() and store into a variable for reference. However, I made it so that the class takes care of itself and I really do not need an outside reference to it. I have tested with a blank Lua file calling my class using Bullet.new() but NOT storing it to a variable. Within the class I have a timer that removes the bullet from the stage and sets self = nil after 60 frames. I monitored texture memory and lua memory and there are no leaks and everything is properly collected. Is this safe practice?

Comments

Sign In or Register to comment.