Hi Guys,
Can someone tell me if I remove the top most group, will it remove all the child groups, displayObjects and eventListeners inside of it?
I can’t find any new information on this but in the old days you used to have to manually remove any event listeners you added.
I’ve been doing testing though monitoring memory usage with the below function:
local monitorMem = function()
collectgarbage()
print( "\nMemUsage: " … collectgarbage(“count”) )
local textMem = system.getInfo( “textureMemoryUsed” ) / 1000000
print( "TexMem: " … textMem )
end
Runtime:addEventListener( “enterFrame”, monitorMem )
and I can’t see a memory leak if I don’t remove the eventListeners… e.g If I keep removing the top group and re-creating it along with all the children the memory is not increasing like I would expect?
Can someone please confirm?
In my example, I have a display group called screen1, this contains a scrollView and inside the scroll view is another display group which holds a grid of squares, each square is a display group that contains 5 display objects, 1 of those display objects has an event listener.
Kind Regards,
Krivvenz.