Davit Karapetyan Davit Karapetyan - 7 months ago 45
C# Question

Can I call specific generation GC

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


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: