コード例 #1
0
        void Destructor()
        {
            if (m_StaticIndex >= 0)
            {
                RenderChainStaticIndexAllocator.FreeIndex(m_StaticIndex);
            }
            m_StaticIndex = -1;

            UIRUtility.Destroy(m_DefaultMat);
            UIRUtility.Destroy(m_DefaultWorldSpaceMat);
            m_DefaultMat = m_DefaultWorldSpaceMat = null;

            Font.textureRebuilt -= OnFontReset;
            painter?.Dispose();
            m_TextUpdatePainter?.Dispose();
            atlasManager?.Dispose();
            vectorImageManager?.Dispose();
            shaderInfoAllocator.Dispose();
            device?.Dispose();

            painter             = null;
            m_TextUpdatePainter = null;
            atlasManager        = null;
            shaderInfoAllocator = new UIRVEShaderInfoAllocator();
            device = null;

            m_ActiveRenderNodes = 0;
            m_RenderNodesData.Clear();
        }
コード例 #2
0
        protected void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                Font.textureRebuilt -= OnFontReset;
                painter?.Dispose();
                m_TextUpdatePainter?.Dispose();
                atlasManager?.Dispose();
                device?.Dispose();

                painter             = null;
                m_TextUpdatePainter = null;
                atlasManager        = null;
                device = null;
            }
            else
            {
                DisposeHelper.NotifyMissingDispose(this);
            }

            disposed = true;
        }
コード例 #3
0
        void Destructor()
        {
            Font.textureRebuilt -= OnFontReset;
            painter?.Dispose();
            m_TextUpdatePainter?.Dispose();
            atlasManager?.Dispose();
            vectorImageManager?.Dispose();
            shaderInfoAllocator.Dispose();
            device?.Dispose();

            painter             = null;
            m_TextUpdatePainter = null;
            atlasManager        = null;
            shaderInfoAllocator = new UIRVEShaderInfoAllocator();
            device = null;
        }