I am starting my first game with gideros and have issue one problem so far.
It is about memory managment of inheritance class of Sprite object
It is not been cleaned when the objects are removed and i do not understand what the cause is!
EnemyObj = Core.class(Sprite);
--self.speed = 1;
self:addEventListener(Event.ENTER_FRAME, self.update, self)
self:setPosition(_W+_trX, RAND(0-_trY, _H+_trY))
self = nil
local x = self:getX();
self:setX(x - 5);
if (x < -200) then
Rocket = Core.class(EnemyObj);
local texture = Texture.new("images/icons/rocket.png",true);
local bitmap = Bitmap.new(texture);
--self.speed = 5;
Pillar = Core.class(EnemyObj);
and on touch i call: stage:addChild(Rocket.new())
But when the destroy function is called, the memory is not been cleaned. The object is removed from stage but still exists somehow?
Does anyone have an idea what could be wrong?