diff --git a/Source/Unity3D/UnityProject/Assets/.DS_Store b/Source/Unity3D/UnityProject/Assets/.DS_Store deleted file mode 100644 index 23129791..00000000 Binary files a/Source/Unity3D/UnityProject/Assets/.DS_Store and /dev/null differ diff --git a/Source/Unity3D/UnityProject/Assets/Plugins/LuaScriptCore/LuaManagedValue.cs b/Source/Unity3D/UnityProject/Assets/Plugins/LuaScriptCore/LuaManagedValue.cs new file mode 100644 index 00000000..865e7af2 --- /dev/null +++ b/Source/Unity3D/UnityProject/Assets/Plugins/LuaScriptCore/LuaManagedValue.cs @@ -0,0 +1,27 @@ +using System; + +namespace cn.vimfung.luascriptcore +{ + public class LuaManagedValue : LuaBaseObject + { + private LuaValue _source; + private LuaContext _context; + + public LuaManagedValue (LuaValue value, LuaContext context) + { + _source = value; + _context = context; + + _context.retainValue (_source); + } + + ~LuaManagedValue () + { + if (_context != null && _source != null) + { + _context.releaseValue (_source); + } + } + } +} + diff --git a/Source/Unity3D/UnityProject/Assets/Plugins/LuaScriptCore/LuaManagedValue.cs.meta b/Source/Unity3D/UnityProject/Assets/Plugins/LuaScriptCore/LuaManagedValue.cs.meta new file mode 100644 index 00000000..1bbe25b3 --- /dev/null +++ b/Source/Unity3D/UnityProject/Assets/Plugins/LuaScriptCore/LuaManagedValue.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: be9d5269696fb4a62be0c470b5bf261c +timeCreated: 1495616278 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: