Jump to content
Search Community

onCompleteParams memory management

difix test
Moderator Tag

Recommended Posts

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...