• You can probably see by typing trace() after a timeout is set. The timeout itself might take maybe 6 memory units, but the real killer is the function that you define to run in the timeout.

    That needs the function code itself (which is copied each time because it was defined inside the function), as well as the scope in which the function was originally defined.

    But either way I imagine you had lots of timeouts queued up. It's the kind of thing that would be really bad news even on a PC with loads of memory - it just becomes more of a problem more quickly on a constrained device.

About

Avatar for Gordon @Gordon started