The Blog

Garbage Collection

Useful article on garbage collection in Flash Player 8. Switching to ‘mark and sweep’ means it’ll run faster.
But it also runs different and there are certain things to bear in mind.

One example: Particle systems. If you have objects representing particles, reuse the objects when they die instead of allocating new ones. Allocating large amounts of objects in a short time can kill the GC since unlike with the referencing counter model object are not freed right away anymore. So when objects die, put them into a recycle container from which you create more particles.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment

Let us know your thoughts on this post but remember to place nicely folks!