摘要: Timers and Transitions 可能是崩溃的其中一个最常见的原因,主要是因为无数的事件可 以发生在timer/transition开始和结束之间。更糟糕的是,当你不在使用时忘记了去取消他 们,它们可能会被困在内存中并引起更多的泄漏。有一种方法,你能管理好它们,把所有的timers and transitions储存在表中,以便当你确 定没有timers and transitions应该运行时,你可以立即取消他们。如果你添加下列代码到你的main.lua文件(或另一个模块然后require它),你可以轻松地追 踪你的timers and transitions并且在需要的时候立刻 阅读全文
posted @ 2012-02-01 10:44 superchao 阅读(159) 评论(0) 推荐(0) 编辑
摘要: = Things you should know about Lua's performance =This wiki is a result of some lua performance tests (the widget is included with ca sandbox).[[BR]][[BR]][[BR]]== TEST 1: localize ==Code:{{{#!lualocal min = math.min}}}Results:{{{#!html<div style="margin-left:25px"><font color 阅读全文
posted @ 2012-02-01 10:43 superchao 阅读(491) 评论(0) 推荐(0) 编辑