コード例 #1
0
ファイル: NativeCore.cs プロジェクト: gitter-badger/Strange
        /// <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();
        }
コード例 #2
0
ファイル: NativeCore.cs プロジェクト: gitter-badger/Strange
 public static void UpdateDispatch(float timeStep)
 {
     RefCounted.ReleaseFinalized();
 }