lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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