[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fly in from right banner



In a message some time ago Brendan Eich mentioned that setTimeout caused a
"memory leak" -- as does eval -- because its string is not cleared, but
again this is heap related not stack related.

IAC... as you can see, 14K+ iterations shouldn't be too much of a problem
for most any script (the average manner makes just 120 iterations a minute,
the average cliock just 60).  If anyone leaves their browser on one URL for
that many iterations has got to be insane!

-- Gordon
http://gmccomb.com/javascript

At 03:43 PM 3/11/96 -0800, you wrote:
>On Sun, 10 Mar 1996, Gordon McComb wrote:
>
>> John, FYI and FWIW Departments:  I came up with the following test script to
>> see if setTimeout acted recursively.  Though this is not a definitive test,
>> I think it points in a strong direction: setTimeout does NOT set up a
>> recursive loop.  Here's the test script.  When I ran it, I consistently got
>> 507 loops for the stack test before JavaScript pooped out a stack overflow
>> error.  I got over 10,000 loops for the setTimeout test (I spun the mouse to
>> get the interval to a little faster, and my arm, got too tired!), and didn't
>> get an error at all.  I'd be interested in the results of others.  For
>> tabulation purposes, I'm using Windows 95.
>
>I got 14479 interations of the setTimeout before it just stopped (!?).
>I did not try the other. But, isn't that an interesting number? Looks
>so arbitrary...Then I tried to press each button once...crash.
>I guess there's something fishy going on in the settimeout()
>recursion.
>
>JP
>
>______________________________________________________________
>Jon Gorrono (Gorroño)            1400-M Surge II
>New Media Programmer/Analyst            UC Davis
>Creative Communication Services         Davis, CA   95616
>A Division of Information Technology    (916)752-0218;FAX-4655
>University of California at Davis       jpgorrono@ucdavis.edu
>Owner:Digital Video Discussion List	DIGVID-L@UCDAVIS.EDU
>
>"Dogs are insecure and neurotic and agitated, and generally in
> the throes of some unbecoming emotion,
> and I like them." - Adair Lara
>______________________________________________________________
>--------------------------------------------------------------------
>For help about the list, please send a message to 'majordomo@obscure.org'
>with the message body 'help'. To unsubscribe, send a message to
>'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
>List archives and pointer to FAQ: http://www.obscure.org/javascript/
>
>

--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/