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.

Add to:
Bloglines | | Digg it | +Google | Spurl | Y! MyWeb

Leave a Reply