[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: destroy a variable
- From: "Zachary P. Landau" <kapheine@...>
- Date: Mon, 30 Apr 2007 13:04:12 -0400
On 4/29/07, Roger D Vargas <luo_hei@yahoo.es> wrote:
I have found a weird problem while writing my server.
If I repeatedly execute the string "a=math.random(1,20)" in my embedded
interpreter, when I stop the host I got a crash with a lot of glibc
errors. If I replace the code by "math.random(1,20)" no problems occurs.
Is there any way to destroy variables used in an script when I dont need
them anymore?
Is this on some low-memory device? I wonder if it is possible that
you are allocating memory faster than the garbage collector can
reclaim it. Although I wouldn't expect "a=math.random(1,20)" and
"math.random(1,20)" to be significantly different as far as memory
allocation is concerned.
--
Zachary P. Landau <kapheine@gmail.com>