From 6016ece202eef94ed76bd20d4f7879ccc71cc2e6 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 12 Mar 2019 23:08:31 +0800 Subject: *luax --- Source/3rdParty/Luax/luax_ref.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Source/3rdParty/Luax/luax_ref.h') diff --git a/Source/3rdParty/Luax/luax_ref.h b/Source/3rdParty/Luax/luax_ref.h index 122c448..759a314 100644 --- a/Source/3rdParty/Luax/luax_ref.h +++ b/Source/3rdParty/Luax/luax_ref.h @@ -5,18 +5,35 @@ namespace Luax { /// - /// Lua reference,保存在LUA_REGISTRYINDEX寄存器里面。 + /// 引用,存在LUA_REGISTRYINDEX下面的两个表里 /// class LuaxRef { + public: + + enum + { + STRONG, + WEAK + }; + + private: + + int mRefID; // = luaL_ref }; + /// + /// 强引用,在LUA_REGISTRYINDEX["LUAX_STRONGREF_TABLE"]里 + /// class LuaxStrongRef: public LuaxRef { }; + /// + /// 弱引用,在LUA_REGISTRYINDEX["LUAX_WEAKREF_TABLE"]里 + /// class LuaxWeakRef : public LuaxRef { -- cgit v1.1-26-g67d0