wonderfl - build flash online

Closure Memory Leak

Example show that don't nulled variables hold instances for a long time, and maybe forever.

So good advice - to null local variable if you use closure.

## UPDATE

Memory Leaks can be fit with System.gc(). Look here:
http://wonderfl.net/c/mb50 - Closure Memory Leak with System.gc().

So them will be removed in mark/sweep phase http://www.adobe.com/devnet/actionscript/learning/as3-fundamentals/garbage-collection.html but anyway it's performance cost phase and better to avoid using of closures.

hyzhaka hyzhaka

add to favorites

Embed

Code Fullscreen

Favorite by

Tags

sectKeywords

Forked

ページの先頭へ戻る