示例#1
0
    public static void ReleaseInactive()
    {
        int i = UIDrawCall.mInactiveList.size;

        while (i > 0)
        {
            UIDrawCall uIDrawCall = UIDrawCall.mInactiveList[--i];
            if (uIDrawCall)
            {
                uIDrawCall.Clear();
                NGUITools.DestroyImmediate(uIDrawCall.gameObject);
            }
        }
        UIDrawCall.mInactiveList.Clear();
        while (UIDrawCall.matCache.Count > 0)
        {
            Material obj = UIDrawCall.matCache.Dequeue();
            NGUITools.DestroyImmediate(obj);
        }
    }