New Stack crash

Dan Friedman dan at clearvisiontech.com
Wed Jun 23 01:28:27 EDT 2010


Greetings!

I have the following script in a button:

on mouseUp
  put 0 into i
  repeat 30000
    add 1 to i
    put ("testStack_" & i) into sName
    new stack sName
    delete stack sName
  end repeat
end mouseUp

Two questions:

(1) Why would this start to slow down?  It starts off quite fast, then it beings to slow down.  It gets so that it takes 5, or 6 seconds to complete one repeat.  This happens in both in REV and as a standalone.  Is this because of the "add 1 to i"?  Is this no better than "repeat with i = ...", which is known to be slow?

(2) Rev will eventually crash.  In my testing, it seems random and crashes sometime after about 1700.  Shouldn't the "delete stack" call completely remove the stack?  So, why crash?

Any thoughts?


More information about the use-livecode mailing list