We have application that runs 24h per day and 7 days per week. Sometimes CPU go to 100% and then go back to 80%. The same with RAM. Is it smart to manually call GC.Collect after few hours or betterto leave it automatically.
We are using C# 2010, SQL 2008 and Fluent Nhiberanet. This is desktop application.
I wouldn’t call it smart to call
GC.Collect()“every few hours”, or “when RAM usage goes to high”, but I’d call it smart to call it whenever you are in a position of having more information than the GC, some exmaplesThe GC is a highly optimized peace of code and quite smart, but it can only work on information it has.