internal void DestroyInstance()
        {
            EndExclusiveEntityTransaction();

            m_ComponentJobSafetyManager->PreDisposeCheck();

            m_UniversalQuery.Dispose();
            m_UniversalQuery = null;

            m_UniversalQueryWithChunks.Dispose();
            m_UniversalQueryWithChunks = null;

            m_ComponentJobSafetyManager->Dispose();
            UnsafeUtility.Free(m_ComponentJobSafetyManager, Allocator.Persistent);
            m_ComponentJobSafetyManager = null;

            Entities.EntityComponentStore.Destroy(m_EntityComponentStore);

            m_EntityComponentStore = null;
            m_EntityQueryManager.Dispose();
            m_EntityQueryManager = null;
            m_ExclusiveEntityTransaction.OnDestroy();

            m_ManagedComponentStore.Dispose();

            m_World = null;
            m_Debug = null;
        }
예제 #2
0
        internal void DestroyInstance()
        {
            PreDisposeCheck();

            #if ENABLE_UNITY_COLLECTIONS_CHECKS
            m_UniversalQuery._DisallowDisposing           = null;
            m_UniversalQueryWithChunks._DisallowDisposing = null;
            #endif
            m_UniversalQuery.Dispose();
            m_UniversalQueryWithChunks.Dispose();
            m_UniversalQuery           = null;
            m_UniversalQueryWithChunks = null;

            m_DependencyManager->Dispose();
            UnsafeUtility.Free(m_DependencyManager, Allocator.Persistent);
            m_DependencyManager = null;

            Entities.EntityComponentStore.Destroy(m_EntityComponentStore);
            m_EntityComponentStore = null;

            Entities.EntityQueryManager.Destroy(m_EntityQueryManager);
            m_EntityQueryManager = null;

            m_EntityQueryManager = null;
            m_ExclusiveEntityTransaction.OnDestroy();

            m_ManagedComponentStore.Dispose();

            m_World = null;
            m_Debug = null;
        }
예제 #3
0
        public void Dispose()
        {
            m_EntityQuery.Dispose();
            m_EntityQuery = null;

            m_PrefabQuery.Dispose();
            m_PrefabQuery = null;

            m_LinkedEntityGroupQuery.Dispose();
            m_LinkedEntityGroupQuery = null;

            m_EntityManager = null;
        }
예제 #4
0
        public void Dispose()
        {
            if (m_ShadowWorld != null && m_ShadowWorld.IsCreated)
            {
                m_ShadowWorld.Dispose();
            }
            m_ShadowWorld            = null;
            m_ShadowWorldEntityQuery = null;

            if (m_SrcWorld != null && m_SrcWorld.IsCreated)
            {
                m_SrcWorldEntityQuery.Dispose();
            }
            m_SrcWorldEntityQuery = null;
            m_SrcWorld            = null;

            m_TypeInfoStream.Dispose();
        }