Memory leak or stupid error?
So, earlier today I decided to do a little programming exercise to learn a bit about tables. I tried making a script to fill a table with random characters from another table and then print the table to the screen.
An hour or so and several errors later, my code is finally working... sorta. Each iteration is approximately half the speed of the previous one. By the 5th or 6th time through the loop, the program is running at about 1 iteration per minute.
After a while the script stops responding to input and the system has to be shut off. You have to hold down the power button for about 10 seconds to turn it off and to get it back on you have to slide the switch twice.
What the hell is going on here? o_O
Some other questions:
1. When I make a variable in a function local, the variable is "deleted" after the function ends, right?
2. If I reassign the value of a local variable in a function do I have to remind Lua Player that it's local?
Thanks in advance.
|