Re: Loadlib work 5,1
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Loadlib work 5,1
- From: Asko Kauppi <asko.kauppi@...>
- Date: Fri, 3 Sep 2004 10:32:55 +0300
I've hacked that by defining:
#define lua_close(L) ( gluahost_close(L), lua_close(L) )
;)
3.9.2004 kello 02:52, David Burgess kirjoitti:
Would it be possible to add a GC method to the Win32 code
in loadlib.c for library handles?
e,g,
static int loadlib_gc(lua_State *L)
{
HINSTANCE h = (HINSTANCE)(lua_unboxpointer(L,1));
if (h) FreeLibrary(h);
return 0;
}
In practice this method only gets called when lua_close() is called.
--
db