I don’t believe changing the viewstack children to applications will solve your problem.  What you can do is tell the ViewStack to destroy the children that aren’t showing, but there’s no guarantee that you’re going to give the memory back to the system.  This is one of the things we’re focusing on in the next Player.  You could also run the profiler and see if there are particularly expensive methods being called more often than you think.  Basically run the profiler a few times, the first time just let the application start, that will give you a baseline.  The next time run through the app once, that will show you everything executing at least once.  And the last time run through the code where you’re switching screens a lot in case you think there’s a memory leak.  See what methods are getting called a lot more that 3rd time and maybe you’ll catch something.

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec
Sent: Tuesday, May 10, 2005 1:25 PM
To: [email protected]
Subject: Re: [flexcoders] mx;Loader/ memory leaking/ any way to programatically clear the memory/browser crashes

 

Hello,

 

I've checked the archived email and saw some people having the same questions in regards with the way garbage collector works. Unfortunately, I wasn't able to find anything that would help. Is there anyone out here that know how the GC works and what we need to know to avoid memory leaking... For example I'm not sure that loading/unloading am mxml via mx:Loader will ever free up the memory or will continue to add on top of the used memory......

 

I have the same question for view stacks...For a large app is it safe to group multiple screens under the same view stack or using separates applications would be the way to go....

 

 

Thanks for your patience,

Valy



Manish Jethani <[EMAIL PROTECTED]> wrote:

On 5/10/05, Valy Sivec <[EMAIL PROTECTED]> wrote:

> I'm wondering if adding this code on the "unload" event will help cleaning
> the memory....because I'm suspecting some memory leaking...

> var source = event.target;
>
> for( i: Number = 0; i< source.numChildren; i++ ){
>
> source.destroyChildrenAt(i);
>
> }

I doubt that (not that I have any suggestions).  Check out these threads:
http://www.mail-archive.com/[email protected]/msg04331.html
http://www.mail-archive.com/[email protected]/msg04462.html


Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.



Yahoo! Groups Links

Reply via email to