|
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