[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re: Help ! A problem with the memroy
- From: Sam Roberts <vieuxtech@...>
- Date: Mon, 12 Apr 2010 23:00:26 -0700
On Mon, Apr 12, 2010 at 7:00 PM, Aurora <bravefly@gmail.com> wrote:
> Dear Sam,
>
> "Possibly, it's because the last file created global vars, and the gc
> doesn't know that they will never be used again. "
>
> That's it. You are so bright.
> The method you give is ok. But I need to do it in the C source code of lua, not in lua.
If you can do it in lua, you can do it with lua's C interface, with a
bit more trouble:
local g = {} -> lua_newtable()
setfenv() -> lua_setfenv()
setmetatable() -> lua_setmetatable()
etc....
Sam