[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Removing functions from memory.
- From: "Nick Trout" <nick@...>
- Date: Fri, 3 Aug 2001 18:17:45 +0100
----- Original Message -----
From: "Jens Wessling" <wessling@soartech.com>
| Is there a way to remove functions from memory once they have been loaded?
function x()
end
x=nil -- remove reference to function object
collectgarbage() -- force garbage collection immediately
>From manual:
collectgarbage ([limit])
Sets the garbage-collection threshold for the given limit (in Kbytes), and
checks it against the byte counter. If the new threshold is smaller than the
byte counter, then Lua immediately runs the garbage collector (see Section 5.6).
If limit is absent, it defaults to zero (thus forcing a garbage-collection
cycle).
N