Exemple #1
0
        protected override void UnloadData()
        {
            Clusters.Dispose();

            Clusters.OnClusterCreated -= OnClusterCreated;
            Clusters.OnClusterRemoved -= OnClusterRemoved;
            Clusters = null;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool.RemoveReference();
                m_threadPool = null;

                m_jobQueue.Dispose();
                m_jobQueue = null;
            }
        }
Exemple #2
0
        protected override void UnloadData()
        {
            Clusters.Dispose();

            Clusters.OnClusterCreated -= OnClusterCreated;
            Clusters.OnClusterRemoved -= OnClusterRemoved;
            Clusters = null;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool.RemoveReference();
                m_threadPool = null;

                m_jobQueue.Dispose();
                m_jobQueue = null;
            }
            m_destructionQueue.Clear();

            if (MyPerGameSettings.Destruction)
            {
                //Dispose material otherwise memory is corrupted on DS service and memory leaks
                HkdBreakableShape.DisposeSharedMaterial();
            }
        }