I just upgraded to the latest version of Corona SDK (CoronaSDK_2011.484)
After this it seams that the garbage collection doesn’t work as it causes the simulator to crash.
This is what the Terminal says:
1328 Bus error "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $\*
logout
This is what causes the crash:
[lua]collectgarbage(“collect”);[/lua]
The collectgarbage call comes from within a function that removes an object upon collision.
[lua]function bump:pop()
–Remove the object
self:removeSelf();
self = nil;
collectgarbage(“collect”);
end
function bump:collision(e)
if(e.phase == “ended”) then
–If a bump collides with the ball
if(e.other.type == “ball”) then
self:pop();
end
end
end
bump:addEventListener(“collision”, bump);[/lua]
Is this a bug? [import]uid: 41041 topic_id: 9036 reply_id: 309036[/import]