Beispiel #1
0
    private static int Destroy(IntPtr L)
    {
        Delegate @delegate = ToLua.CheckObject(L, 1, typeof(Delegate)) as Delegate;

        Delegate[] invocationList = @delegate.GetInvocationList();
        for (int i = 0; i < invocationList.Length; i++)
        {
            LuaDelegate luaDelegate = invocationList[i].Target as LuaDelegate;
            if (luaDelegate != null)
            {
                luaDelegate.Dispose();
            }
        }
        return(0);
    }
Beispiel #2
0
    static int Destroy(IntPtr L)
    {
        Delegate arg0 = (Delegate)ToLua.CheckObject <Delegate>(L, 1);

        Delegate[] ds = arg0.GetInvocationList();

        for (int i = 0; i < ds.Length; i++)
        {
            LuaDelegate ld = ds[i].Target as LuaDelegate;

            if (ld != null)
            {
                ld.Dispose();
            }
        }

        return(0);
    }