Jump to content
Search Community

TweenMax Memory Management ??? [PLEASE CLARIFY]

Applauz test
Moderator Tag

Recommended Posts

Can someone clarify the best practice for this situation.

 

 

Let's say I load a dynamic movie clip from my library.. inside that movie clip is some TweenMax occurrences.

 

When I kill and null the movie clip and remove all the listeners that were in that movie clip .. do I need to do any cleanup of those TweenMax references ? Do they hold much weight in memory ? are they automatically garbage collected ?

 

 

Cheers!

Link to comment
Share on other sites

Tweens don't take up much in terms of memory at all, no. However, I would recommend killing any tweens in your sub-swf when you get rid of it. Even if you don't kill them, they should eventually get gc'd after they complete anyway, but I just like being very clean about things - that's why I'd recommend killing them manually. What if, for example, you have a TweenMax with a repeat:-1 that never ends? That would keep running. See what I mean? But memory-wise, tweens ain't a big deal.

Link to comment
Share on other sites

One thing I discovered today. I had a movieclip being loaded from the library that has a blitmask setup in it.

 

First time it loads on an iPad it's fine. When I kille and destroy that movieclip and then access it again it would always crash my app.

 

I call blitmask.dispose() when I kill the movieclip and all crashing is fixed!

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