GC.Collect appears to start the garbage collection in a background thread, and then return immediately. How can I run GC.Collect synchronously -- i
Finalizers are run on a dedicated, high-priority background thread. From the background in your post, I gather that you can simply do
GC.Collect();
GC.WaitForPendingFinalizers();
The Collect() will schedule any non-rooted instances for finalization and then the thread will wait for the finalizer thread to complete.