Thanks for the reply Tom,

I just have this on a 1 second timer:

public function timerHandler(event:TimerEvent):void {
            time = getTimer()
            totmem = flash.system.System.totalMemory;
            maxmem = Math.max(maxmem, totmem);
        }

I understand that garbage collection doesn't run until it's needed 
to, but what's causing the memory to go up when there is nothing 
happening? I know that the timer is running now, but I observe the 
same behaviour without this timer and just watching memory from the 
task manager (usually in jumps of 4K or 8K every couple of seconds).

Also while garbage collection usually kicks in a drops the memory 
back to the starting memory (more or less), sometimes (usually when 
I've left it overnight, but not alway) the memory will continue to 
rise to a much higher level (i.e. from 4.5 to 29.5 million bytes) 
never to be recovered by garbage collection. This is my main concern 
as in my larger application it has lead to my browser crashing on 
occasion!

Cheers
Bill

(P.S. You'll find my test application in my original post - switch 
source to a local video as the flv link I posted doesn't work anymore)

--- In [email protected], Tom Chiverton <[EMAIL PROTECTED]> 
wrote:
>
> On Thursday 24 May 2007, beecee1977 wrote:
> > Is it normal for memory to fluctuate when there are no user
> > interactions (or timers or anything else in the code)?
> 
> Yes. Memory may not be reclaimed unless there is pressure to free 
some.
> How are you measuring it ? 
> 
> -- 
> Tom Chiverton
> Helping to elementarily target dynamic e-services
> on: http://thefalken.livejournal.com
> 
> ****************************************************
> 
> This email is sent for and on behalf of Halliwells LLP.
> 
> Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at St James's Court Brown Street Manchester M2 
2JF.  A list of members is available for inspection at the registered 
office. Any reference to a partner in relation to Halliwells LLP 
means a member of Halliwells LLP. Regulated by the Law Society.
> 
> CONFIDENTIALITY
> 
> This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 8008.
> 
> For more information about Halliwells LLP visit www.halliwells.com.
>


Reply via email to