AS3 Garbage Collector

Helpful Resources on Garbage Collection In ActionScript 3.0

The possibilities of what can be accomplished within ActionScript 3.0 are endless. However, with all those potential possibilities comes the responsibility of keep your code tidy with garbage collection.

In ActionScript 3.0, there are no longer assumptions as to whether or not your code is being kept tidy. A direct understanding of garbage collection and how the built-in garbage collector goes about his business is going to be one of the most important steps fro writing efficient code.

Garbage collection within AS3 has been a trending topic for a few years now and there are a great amount of resources on the topic. I’ve put together a list of those helpful resources that will aide in understanding the garbage collection process and the built-in garbage collector.

Getting into the habit of paying attention to the fine details of garbage collection will make you better developer and will prevent performance issues that will come about otherwise.

Did I leave some out?

If you know of a resource that hasn’t already been mentioned, please feel free to add comment below with the link. Enjoy!

Understanding garbage collection in Flash Player 9

[threecol_one][browsershot url=”https://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html” width=”190″][/threecol_one]
[threecol_two_last]To understand how to optimize your code for ActionScript 3.0, you’ll first need an understanding of how the garbage collector works in Flash Player 9. Flash has two processes for finding objects that are not in active use and removing them. This article looks at both techniques and describes how they are relevant to your code. [/threecol_two_last]

[hr]

Resource management strategies in Flash Player 9

[threecol_one][browsershot url=”https://www.adobe.com/devnet/flashplayer/articles/resource_management.html” width=”190″][/threecol_one]
[threecol_two_last]ActionScript 3.0 empowers Flash developers with faster code execution and many new API enhancements. From a developer’s standpoint, these changes require a much higher level of responsibility than ever before. This article focuses on the implications that some of the new ActionScript 3.0 features have on resource management, and looks briefly at some of the new tools in ActionScript 3.0 that can help you to track and manage memory more effectively.[/threecol_two_last]

[hr]

Performance improvements in Flash Player 8

[threecol_one][browsershot url=”https://www.adobe.com/devnet/flashplayer/articles/fp8_performance.html” width=”190″][/threecol_one]
[threecol_two_last]The new garbage collector in Flash Player 8 is the main driver of performance boosts in ActionScript execution and reduced memory usage. As the size and complexity of Flash applications increased, we were starting to reach the limits of the reference-counting algorithm used for garbage collection in Flash Player 7. By switching from simple reference counting to deferred reference counting, we eliminated over 90% of the reference counting in Flash Player.[/threecol_two_last]

[hr]

AS3 Avoider Game Tutorial, Part 12: Garbage Collection

[threecol_one][browsershot url=”http://gamedev.michaeljameswilliams.com/2009/03/25/avoider-game-tutorial-12/” width=”190″][/threecol_one]
[threecol_two_last]In this, the final part of the AS3 and Flash CS3 conversion of Frozen Haddock’s avoider game tutorial, it deals with garbage collection and how it can be approached from a Flash Game Developer’s point of view.[/threecol_two_last]

[hr]

Resource Management for AS3, FLEX2 and Flash Player 9

[threecol_one][browsershot url=”http://www.gskinner.com/talks/resource-management/” width=”190″][/threecol_one]
[threecol_two_last]This session looks under the hood of Flash Player 9’s Garbage Collector, examines key issues that developers and designers will face, explains the new tools available in AS3 for resource management, and explores both simple and advanced solutions for ensuring your AS3 content performs beautifully.[/threecol_two_last]

[hr]

AS3: Resource Management pt 1

[threecol_one][browsershot url=”http://gskinner.com/blog/archives/2006/06/as3_resource_ma.html” width=”190″][/threecol_one]
[threecol_two_last]In this first of a three part series, Grant Skinner takes a look at the underlying mechanics of the Garbage Collector, discusses the issues you are likely to face, examines the new tools available to you for handling resource management in AS3, and offer solutions/code to help you circumvent many of the common problems you will face.[/threecol_two_last]

[hr]

AS3: Resource Management pt 2

[threecol_one][browsershot url=”http://gskinner.com/blog/archives/2006/07/as3_resource_ma_1.html” width=”190″][/threecol_one]
[threecol_two_last]This article will focus on the implications some of the new features of AS3 have on resource management, and the potential headaches they could cause you even in simple projects[/threecol_two_last]

[hr]

AS3: Resource Management pt 3

[threecol_one][browsershot url=”http://gskinner.com/blog/archives/2006/08/as3_resource_ma_2.html” width=”190″][/threecol_one]
[threecol_two_last]The third article in the series will introduce some of the new tools we have at our disposal to deal with these issues surrounding Garbage Collection within AS3.[/threecol_two_last]

[hr]

Failure to Unload: Flash Player 9s Dirty Secret

[threecol_one][browsershot url=”http://gskinner.com/blog/archives/2008/04/failure_to_unlo.html” width=”190″][/threecol_one]
[threecol_two_last]Flash Player 9 has a very dirty secret. It doesn’t even try hide this dirty secret, but it’s still not that widely known. You see, Flash Player has severe problems with separation anxiety – once it’s loaded some content, it has a really hard time ever letting it go. Technically speaking, it is extremely difficult to make Flash Player 9 unload ActionScript 3 content.[/threecol_two_last]

[hr]

Additional Information on Loader.unloadAndStop

[threecol_one][browsershot url=”http://gskinner.com/blog/archives/2008/07/additional_info.html” width=”190″][/threecol_one]
[threecol_two_last]Adobe has added the Loader.unloadAndStop method to Flash player 10 to address some of the issues outlined in this article.[/threecol_two_last]

[hr]

AS3 Memory Management

[threecol_one][browsershot url=”http://tomgabob.blogspot.com/2009/11/as3-memory-management.html” width=”190″][/threecol_one]
[threecol_two_last]A collection of tips based upon personal experiences dealing with garbage collection and memory management from of one developer named Tom Mason.[/threecol_two_last]

[hr]

AS3: Weakly Referenced Listeners

[threecol_one][browsershot url=”http://gskinner.com/blog/archives/2006/07/as3_weakly_refe.html” width=”190″][/threecol_one]
[threecol_two_last]In this article, Grant reminds us all of the importance of weakly referenced listeners in AS3 and why you should get in the habit of defining your listeners this way.[/threecol_two_last]

[hr]

Quick Tip: Understanding Garbage Collection in AS3

[threecol_one][browsershot url=”http://active.tutsplus.com/tutorials/workflow/quick-tip-understanding-garbage-collection-in-as3/” width=”190″][/threecol_one]
[threecol_two_last]In this quick tip, you will learn how you can make your code better and more efficient in order to reduce lag and memory issues, thus making it more stable. In order to do this, this tip helps you understand how referencing objects work in AS3, and how to benefit from them to make the GC work properly in your application.[/threecol_two_last]

[hr]

Hands-on Garbage Collection

[threecol_one][browsershot url=”http://www.actionscript.org/resources/articles/882/1/Hands-on-Garbage-Collection/Page1.html” width=”190″][/threecol_one]
[threecol_two_last]This article focuses on example code that exhibits the GC’s behaviors and mechanisms, thereby helping novice programmers fully understand GC in practice and be able to write better code.[/threecol_two_last]

[hr]

Garbage Collection in AS3

[threecol_one][browsershot url=”http://board.flashkit.com/board/showthread.php?t=756290″ width=”190″][/threecol_one]
[threecol_two_last]A popular forum thread on Flash Kit that targets the conversation surrounding garbage collection in AS3, methods and techniques.[/threecol_two_last]

[hr]

Kick starting the garbage collector in Actionscript 3 with AIR

[threecol_one][browsershot url=”http://www.craftymind.com/2008/04/09/kick-starting-the-garbage-collector-in-actionscript-3-with-air/” width=”190″][/threecol_one]
[threecol_two_last]Some neat tricks dealing with garbage collection in AS3 within AIR. This is an example and constant reminder that your long hard efforts of understanding the quirks of AS3 will almost always prove worthy. [threecol_two_last]

[hr]