How to receive a full GC notification with .NET 4.0

While scanning GC class members in IntelliSense with VS 2010 I noticed a few that looked unfamiliar. Turns out new feature allows receiving full GC notifications using the following methods: GC.RegisterForFullGCNotification(..) GC.CancelFullGCNotification(..) GC.WaitForFullGCApproach(..) GC.WaitForFullGCComplete(..) This is how MSDN explains the main user scenario for these notifications: There are situations in which a full garbage collection by…

1