Release() public méthode

引用计数减一
public Release ( ) : void
Résultat void
        public virtual void Dispose()
        {
            UnloadBundle();

            var e = deps.GetEnumerator();

            while (e.MoveNext())
            {
                AssetBundleInfo dep = e.Current;
                if (dep.depChildren != null)
                {
                    dep.depChildren.Remove(this.bundleName);
                }
                dep.Release();
            }
            HashSetPool <AssetBundleInfo> .Release(deps);

            deps = null;
            ListPool <string> .Release(depChildren);

            depChildren = null;
            ListPool <WeakReference> .Release(references);

            references = null;

            if (onUnloaded != null)
            {
                onUnloaded(this);
            }
        }
    static int Release(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                Tangzx.ABSystem.AssetBundleInfo obj = (Tangzx.ABSystem.AssetBundleInfo)ToLua.CheckObject <Tangzx.ABSystem.AssetBundleInfo>(L, 1);
                obj.Release();
                return(0);
            }
            else if (count == 2)
            {
                Tangzx.ABSystem.AssetBundleInfo obj = (Tangzx.ABSystem.AssetBundleInfo)ToLua.CheckObject <Tangzx.ABSystem.AssetBundleInfo>(L, 1);
                object arg0 = ToLua.ToVarObject(L, 2);
                obj.Release(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Tangzx.ABSystem.AssetBundleInfo.Release"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
        public virtual void Dispose()
        {
            UnloadBundle();

            var e = deps.GetEnumerator();

            while (e.MoveNext())
            {
                AssetBundleInfo dep = e.Current;
                dep.depChildren.Remove(this.bundleName);
                dep.Release();
            }
            deps.Clear();
            references.Clear();
            if (onUnloaded != null)
            {
                onUnloaded(this);
            }
        }