When I'm testing a program, my standard "workflow" is to Ctrl-Alt-C out of the program and simply re-run it, whenever I want to test new code.
I know to use package.loaded[library] = nil to unload libraries, but I'm running into two other issues after I started playing around with event.timer():
How do I cancel or purge all timers in response to a Ctrl-Alt-C interrupt? Is there something similar to package.loaded[lib] = nil; library = require(lib) that I can add to the beginning of my programs to wipe out timers from previous runs?
Some elements (I'm not sure which) of my programs are persisting in memory after Ctrl-Alt-C'ing out, resulting in the occasional out-of-memory error if I don't reboot before restarting the program. I suppose a broader question that would encompass the first bullet might be "is there a command I can call to "purge" everything from the interrupted run of my script, ensuring each time I call my main program it begins in a completely clear environment?"
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
When I'm testing a program, my standard "workflow" is to Ctrl-Alt-C out of the program and simply re-run it, whenever I want to test new code.
I know to use package.loaded[library] = nil to unload libraries, but I'm running into two other issues after I started playing around with event.timer():
Thanks!
Link to post
Share on other sites