Esempio n. 1
0
        internal static void Terminate()
        {
            for (int loop = 0; loop < 3; loop++)
            {
                SoundSources.DestroyAll();

                Cursors.DestroyAll();

                Texture2Ds.DestroyAll();
                CubemapTextures.DestroyAll();
                Fonts.DestroyAll();
                Chip2Ds.DestroyAll();

                Shader2Ds.DestroyAll();
                Shader3Ds.DestroyAll();
                Material2Ds.DestroyAll();
                Material3Ds.DestroyAll();
                MaterialPropertyBlocks.DestroyAll();

                ImagePackages.DestroyAll();

                Effects.DestroyAll();

                Meshs.DestroyAll();
                Deformers.DestroyAll();
                Models.DestroyAll();
                MassModels.DestroyAll();
                Terrain3Ds.DestroyAll();

                KeyframeAnimations.DestroyAll();
                AnimationSources.DestroyAll();

                Scenes.DestroyAll();

                Layer2Ds.DestroyAll();
                Object2Ds.DestroyAll();

                Layer3Ds.DestroyAll();
                Object3Ds.DestroyAll();

                PostEffects.DestroyAll();
                Transitions.DestroyAll();

                StaticFiles.DestroyAll();
                StreamFiles.DestroyAll();

                Shapes.DestroyAll();

                //Profilers.DestroyAll();

                Collector.Collect();
                System.GC.Collect();
                System.GC.WaitForPendingFinalizers();
                System.GC.Collect();
                Collector.Collect();
            }
        }
Esempio n. 2
0
        internal static void Update()
        {
            if (Collector.Collect())
            {
                SoundSources.Collect();

                Cursors.Collect();

                Texture2Ds.Collect();
                CubemapTextures.Collect();
                Fonts.Collect();
                Chip2Ds.Collect();

                Shader2Ds.Collect();
                Shader3Ds.Collect();
                Material2Ds.Collect();
                Material3Ds.Collect();
                MaterialPropertyBlocks.Collect();

                ImagePackages.Collect();
                MediaPlayers.Collect();

                Effects.Collect();

                Meshs.Collect();
                Deformers.Collect();
                Models.Collect();
                MassModels.Collect();
                Terrain3Ds.Collect();

                KeyframeAnimations.Collect();
                AnimationSources.Collect();
                AnimationClips.Collect();

                Scenes.Collect();

                Layer2Ds.Collect();
                Object2Ds.Collect();

                Layer3Ds.Collect();
                Object3Ds.Collect();

                PostEffects.Collect();

                Transitions.Collect();

                StaticFiles.Collect();
                StreamFiles.Collect();

                Shapes.Collect();
                Collider2Ds.Collect();
            }
        }