Пример #1
0
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            NEditorEngine eng = NexusEditor.Program.engine;

            eng.DestroyLevel(levelPreview);
            levelPreview.Dispose();
            base.Dispose(disposing);
        }
Пример #2
0
        protected override void Dispose(bool disposing)
        {
            NEditorEngine eng = NexusEditor.Program.engine;

            if (m_lgtActor != null)
            {
                m_lgtActor.Dispose();
                m_lgtActor = null;
            }
            if (m_resActorComp != null)
            {
                m_resActorComp.Dispose();
                m_resActorComp = null;
            }
            eng.DestroyLevel(m_level);
            m_level.Dispose();
            base.Dispose(disposing);
        }