Hi Sir,
I am currently on c# winform project.
I heard about the advantage of using the Garbage Collection in C#.
Some saying that It will affect the performance of application badly.
suppose I use GC.Collect(); in every event and functions, what will the result - speed up or not..?
I need your suggestion on this....
finally
{
GC.Collect();
}

Bhautik Moradiya74 reputationPosted Dec 26, 2017, 1:05 AM EST
Altaf AnsariRank #1,045 · 1.8K reputationPosted Dec 26, 2017, 1:06 AM EST
A good example of this is if you've just closed a large form. You know that all the UI controls can now be garbage collected, and a very short pause as the form is closed probably won't be noticeable to the user.
Bineesh ViswanathRank #3,087 · 464 reputationPosted Dec 26, 2017, 2:19 AM EST