Example #1
0
        /// <summary>
        ///  Runs a GC collection, waits for any finalizers, and then expires any natives collected
        /// </summary>
        public static void RunGC()
        {
            // run a GC collection
            GC.Collect();
            // finalizers can run on any thread, we're explicitly running a GC here
            // so wait for all the finalizers to finish
            GC.WaitForPendingFinalizers();
            // Anything finalized on another thread will now be available to release
            // in main thread
            RefCounted.ReleaseFinalized();

            ExpireNatives();
        }
Example #2
0
 public static void UpdateDispatch(float timeStep)
 {
     RefCounted.ReleaseFinalized();
 }