don't delete sproto object when share it

This commit is contained in:
Cloud Wu
2015-03-11 16:48:43 +08:00
parent f95d8db4da
commit 03f7661a4a
2 changed files with 6 additions and 4 deletions

View File

@@ -16,7 +16,8 @@ loader.save = core.saveproto
function loader.load(index)
local bin, sz = core.loadproto(index)
return sproto.new(bin,sz)
-- no __gc in metatable
return sproto.new(bin,sz, true)
end
return loader