I have a simple codebelow - and its not collected via garbagecollector
-- Class function
function Canvas:init(w, h)
self.canvas = RenderTarget.new(w, h, true)
self.bitmap = Pixel.new(self.canvas)
self:addChild(self.bitmap)
end |
--Using this class in mu level as local
local canvas = Canvas.new(levelSize.w, levelSize.h) |
--The fix is use
self.bitmap = Bitmap.new(self.canvas) |
after this fix class collected properly, be carefully to use Pixel as lowcost bitmap with RenderTarget !
Bugless coding and have a nice day to to everybody !
Comments
I used the code below to check:
Likes: totebo