difix
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by difix
-
-
this a testing class i did cause of have some memory issues on much, much more complicated situation i am currently in and tried this to test my memory leaks and seems MyClass instance doesnt clear it self, but tweenlite, tw is clearing from memory fine. I am just wondering if I am missing anything. I didnt even have to add any thing to stage or do any to find that instance isnt clearing when its called null.
and MyClass is an empty class.
public class ui extends MovieClip
{
private var tw:TweenLite;
private var instance:MyClass;
public function ui()
{
super();
instance = new MyClass();
tw = TweenLite.to(instance, 1, {x:10, onComplete:clearmem, onCompleteParams:[instance]});
}
private function clearmem(obj:MyClass):void
{
if (tw != null)
{
tw.kill();
tw = null;
}
TweenLite.killTweensOf(obj);
instance = null;
}
}
I am using version 12
onCompleteParams memory management
in GSAP (Flash)
Posted
I placed code to force the gc, and even without it I can see the instance of "tw" getting removed, but not the object instance.