Exemplo n.º 1
0
        void OnDestroy()
        {
            if (__uniqueInstance != this)              //Destroying an illegal duplicate
            {
                return;
            }
            //Call static cleaners first
            GATPlayer.CleanUpStatics();

            if (__allocator != null)
            {
                __allocator.Dispose();
                __allocator = null;
            }

            DefaultPlayer = null;

            __uniqueInstance = null;

            onMainThreadResumed = null;

            //System.GC.Collect();
        }
Exemplo n.º 2
0
        void OnDestroy()
        {
            if( __uniqueInstance != this ) //Destroying an illegal duplicate
            {
                return;
            }
            //Call static cleaners first
            GATPlayer.CleanUpStatics();

            if( __allocator != null )
            {
                __allocator.Dispose();
                __allocator = null;
            }

            DefaultPlayer = null;

            __uniqueInstance = null;

            onMainThreadResumed = null;

            //System.GC.Collect();
        }