[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Redefining functions
- From: lua@...
- Date: Sat, 28 Sep 2002 19:00:01 +0200
I've got a question, when I run this code:
char *t="function foo()\n a=1 \n end\n";
for (int i=0; i < 10000; i++)
The memory usage of Lua increases dramatically, it seems as though Lua
stores the function "foo" 10.000 times instead of replacing the
previous function. Is this correct ? Is it possible (for me) to
change this behaviour, if so where should i start looking in the
I'm asking this because a program that I'm the author of ( girder ),
is about to switch to Lua as the scripting language, but it turned up
that running the same script (with a function) over and over
again will fill up the memory quickly.