We're working on a very niche project with a somewhat customized version of the Flash Player — I can offer more details if necessary.
One of the leaks appears to happen when we attempt to utilize an ENTER_FRAME event, and if that same event is added a second time after it has already been registered. Consider this as an example:
function onFrm(e:Event):void {
}
addEventListener(Event.ENTER_FRAME, onFrm);
addEventListener(Event.ENTER_FRAME, onFrm);
My question is, within the core of TweenMax, knowing that we're using tween overwrites, are there many cases where that scenario may happen within the engine? I figured I'd ask here before I started digging deep into it all. If this does have the chance of happening, I can probably customize the engine to utilize the following which appears to resolve this issue we're having. I realize this could impact performance, but that's less of a concern than the memory issue.
if(!hasEventListener(Event.ENTER_FRAME)) {
addEventListener(Event.ENTER_FRAME, foo);
}
Thanks!