Jump to content
Search Community

Performance and Cleanup Questions

UbiAssassin test
Moderator Tag

Recommended Posts

Hello again :)

 

I have been looking through and implementing some of the new additions offered in V.12 and I started going through my class files and setting up kill calls for all of the functions after I complete them. The following is an example:

 

 private function killAllTitleActions():void
 {
  trace("Clean up the Title and Grid Actions");
  TweenMax.killTweensOf(loadHomeSymbol);
  TweenMax.killTweensOf(loadLevelTitle);
  TweenMax.killTweensOf(loadTitleLineA);
  TweenMax.killTweensOf(loadTitleLineB);
  TweenMax.killTweensOf(loadHomeTitle);
  TweenMax.killTweensOf(buildGridHome);
  TweenMax.killTweensOf(createHomeGrid);
 }

 

It seems Greensock's code does a lot of clean-up under the hood already so I am not really sure if I need to be setting up all of these kill calls or not. My functions will a lot of times create a bunch of tweens and delayedCalls, so I figured that it couldn't hurt to run these kill functions just to make sure that nothing is sticking around in memory. Is this a good practice, or is it unecessary considering all of my tweens and delayCalls are technically complete before I call the cleanup functions.

 

Thanks :)

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...