B
blueapricot416
This is a very basic question -- but I can't find the answer after
looking for 20 minutes.
If you code something like:
function set_It() {
setTimeout('Request_Complete("apple", -72)',5000)
}
and call it 50 times, will it cause problems because you are not
declaring it with a var and destroying it with a clearTimeout after it
is used each time?
I am pretty sure you don't have to clear a timeout -- since it only
happens once (unlike an interval), or "var" it, but I want to make
sure.
Things seem to be working fine, but I am building a complex application
and don't want something basic to screw things up further down the
line...
Thanks,
Blue Apricot
looking for 20 minutes.
If you code something like:
function set_It() {
setTimeout('Request_Complete("apple", -72)',5000)
}
and call it 50 times, will it cause problems because you are not
declaring it with a var and destroying it with a clearTimeout after it
is used each time?
I am pretty sure you don't have to clear a timeout -- since it only
happens once (unlike an interval), or "var" it, but I want to make
sure.
Things seem to be working fine, but I am building a complex application
and don't want something basic to screw things up further down the
line...
Thanks,
Blue Apricot