[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luacom paralyzes os.exit
- From: Kenneth LO <kenlo88@...>
- Date: Wed, 3 Mar 2010 15:22:35 +0800
So lua_close is the problem. Just a quick change to loslib.c
static int os_exit (lua_State *L) {
int t = luaL_optint(L, 1, EXIT_SUCCESS);
lua_close(L);
/* exit(luaL_optint(L, 1, EXIT_SUCCESS)); */
exit(t);
}
So far it does the job but I'm not sure if there is any memory
leakage. The manual says it will free all memory associated with the
state but does it include those locked in COM and OLE? In comparison,
the php manual explicitly says that an exit() will free all memory and
object destructors will always be executed. I tried to find out how
it was implemented from the php source. But then I gave up.