Scaleform® GFx™ 2.2 and earlier versions used a simple reference counting mechanism for ActionScript objects. Although this is adequate for 95% of use cases, due to the simplicity of the mechanism there can be circular references between objects that eventually produce memory leaks.

For example, consider the following piece of ActionScript™ 2 code:
var A = new Object;
var B = new Object;
A.x = B;
B.x = A;
The new garbage collector detects circular references and removes them via an optimized reference count collection algorithm. This cleanup process has negligible impact on the majority of use cases, incurring only a small performance cost when collection is executed.