Use "while" instead of "for" loop statements. "for" will eat your resources,
big time.

--Carl

On 5/9/07, ben gomez farrell <[EMAIL PROTECTED]> wrote:

Usually I just track them down, figure out where my setInterval calls
are and try to plot out in what situations they aren't being cleared.
You could also put some trace calls in the classes or methods you think
are clearing, and if it stops tracing then you know it's gone from memory.

Additionally you might want to look into better organizing your
setInterval.  Maybe put them in an array that you can query.  When you
clear the interval set that index to null.  You could trace the array
and see all the non-null values.  Maybe you could also make a class to
manage your setInterval calls better.  A clearAllIntervals method in a
interval management class could help out a great deal.

I've also had problems before with Delegate memory leaks.  There was a
great article on Delegate memory management in the last year or so - I
can't remember where it was, but you can find a similar one here:
http://teknision.blogspot.com/2005/07/delegatesbe-careful.html

ben

Michael Trim wrote:
> Hi Flashcoders,
>
> What techniques do list members use for tracking down memory leaks in
AS2?
>
> It's a problem with repetitive functions called by setInterval events.
>
> It's slow and cumulative but if you leave it on you can see the PF and
Mem Usage, creep up.
>
> Can anyone out there share any of their tips, I'm tearing my hair out
here,
>
> Thanks,
>
> Michael
>
>
>
>
> Michael Trim
> Senior Producer
> Instant Business
> a:         8-10 Colston Avenue,
>             Bristol, UK, BS1 4ST
> t:         +44 (0) 117 915 5175
> msn:    [EMAIL PROTECTED]
> w:       www.ibltd.com
>
> Company number: 03857884
> Registered office: Prospero House
> 46 -48 Rothesay Road, Luton, Bedfordshire, LU1 1QZ
> VAT Registration No. GB 753 1706 40
>
> The information in this email is confidential and is intended solely for
the addressee. Access to this email by anyone else is unauthorised.  If you
are not the intended recipient, you must not read, use or disseminate the
information.  Any views expressed in this message are those of the
individual sender, except where the sender specifically states them to be
the views of Instant Business Ltd.
>
> Instant Business servers have scanned this e-mail and any attachments
for viruses and every reasonable attempt has been made to ensure that it
does not contain any harmful data.
> It is the responsibility of the recipient to ensure that they are virus
free and no responsibility is accepted by Instant Business Ltd for any loss
of data or damage caused as a result of opening this message.
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to