之前Flash业界大牛Gskinner曾呼吁大家节约内存使用,多采用弱引用方式。然而,今天发现一味地使用弱引用并不是一条捷径。经过观察发现,一些stage事件和timer事件如果设置为弱引用则会出问题。例如,Timer事件设置弱引用后,只能响应第一次。

仔细、深入了解事件机制,比“全部都用……”要更有效果。

Still looking for something?

: http://as3blog.com/as3/addeventlistener-as3-weakreference-false/

Post a comment now » Sorry, the comments are closed.

No comments yet.

Sorry, the comment form is closed at this time.