Davit Karapetyan Davit Karapetyan - 1 year ago 86
C# Question

Can I call specific generation GC

I'm interested if we can specifically call full GC or level 1 GC ?

Answer Source

You can specify the generation when calling Collect method


As Essigwurst wrote - remember about calling GC.WaitForPendingFinalizers() afterwards. Bare in mind that explicitly collecting is not reccomended because of permormance issues. You can get more information in these threads:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download