Search
Sign In
Home
Recent
Media
Videos
Podcasts
Screencasts
Learn
Shows
InsideXbox
ARCast with Ron Jacobs
The History of Microsoft
See All Shows...
Forums
Coffeehouse
Tech Off
Feedback
Sandbox
Key Topics
Visual Studio
Continuum
Identity
Interoperability
Azure
Windows
Wiki
Search
Subscribe
perfsystemgc
Cancel
Edit
[WikiEntry.PreviewButtonText]
Save
Summary: Think twice before using System.GC functions to (try to) solve your perf problems
Avoid GC.Collect
When objects are not being collected in a timely fashion it more often indicates that you have "Mid-Life Crisis" (lots of objects that are dying just as they reach generation 2). Trying to use GC.Collect() to force collections and
GC.WaitForPendingFinalizers()
is much more likely compound these problems than to actually help. Instead, think carefully about your objects lifecycle, especially considering the policy of any caches you have built.
References:
*
Mid Life Crisis
*
Caching Policy
*
Two Things to Avoid
*
When to call GC.Collect
Articles related to the Garbage Collector:
*
Garbage Collector Basics and Performance Hints
*
Using GC Efficiently - Part 1: Fundamentals
*
Using GC Efficiently - Part 2: Different GC Flavors
*
GC Performance Counters
Cancel
Edit
[WikiEntry.PreviewButtonText]
Save
Delete
Edit
Comment on Post
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Reply
In reply to {0}
Download:
[Pending]
Delete
Edit
Comment on Post
Be the first to comment!
Reply
Reply to root
In reply to {0}
Start related discussion
Forum:
Site Feedback
Tech Off
The 9 Guy Around The World
The Coffeehouse
Subject:
Tags
*Loading available tags