diff options
Diffstat (limited to 'src/lua/net/luaopen_Buffer.cpp')
-rw-r--r-- | src/lua/net/luaopen_Buffer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/net/luaopen_Buffer.cpp b/src/lua/net/luaopen_Buffer.cpp index 9278544..68e377b 100644 --- a/src/lua/net/luaopen_Buffer.cpp +++ b/src/lua/net/luaopen_Buffer.cpp @@ -108,7 +108,15 @@ namespace net return 2; } + static int l_gc(lua_State* L) + { + Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_NETWORK_BUFFER); + proxy->release<Buffer>(); + return 0; + } + static const luaL_Reg netbuffer_function[] = { + { "__gc", l_gc }, { "append", l_append }, { "grabString", l_grabString }, { "grabInteger", l_grabInteger }, |