下面的代码在场景中移动对象。但是引起内存泄露,并且没有响应。
//transition back
local function goBack( )
transition.to ( wall2, { time = 10000, x = 100, y = 310, onComplete = startTransition})
transition.to ( wall, { time = 10000, x = 700, y = 200, onComplete = startTransition})
transition.to (gate_a, { time = 10000, x = 100, y = 255, onComplete = startTransition})
transition.to ( stargate_a, { time = 10000, x = 100, y = 255, onComplete = startTransition})
end
//transition start
function startTransition( )
transition.to ( wall2, { time = 10000, x = 700, y = 310, onComplete = goBack})
transition.to ( wall, { time = 10000, x = 100, y = 200, onComplete = goBack})
transition.to ( gate_a, { time = 10000, x = 700, y = 255, onComplete = goBack})
transition.to ( stargate_a, { time =10000, x = 700, y = 255, onComplete = goBack})
end
startTransition()
怎么样解决内存泄露的问题?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。