Friday, June 22, 2007 12:49 AM royashbrook

Top 20 .NET Garbage Collection (GC) Articles

Ah. Garbage Collection... how I love and hate thee. =P

I think one sad thing about programming in .net is that it seems many developers don't know or care anything about garbage collection and memory management. You used to *have* to know about it in order to write bug free code. I suppose it is a two edge sword in that developers can develop faster as the intention was to relieve developers of the need to know or care anything about memory management. I personally have always tried to follow best practices for implementation and have tried to stay somewhat cautious of issues related to memory. I've been fortunate in never really having any memory management related issues in my previous applications. However, there, but for the grace of God, I too could go.

Recently, we have come across an issue that has required some intense scrutiny on our memory management process. Although it appears we are using mostly best practices for our access and use of certain objects (mainly in the System.Xml namespace) we are still running into memory problems. Unfortunately, our application includes some manual invocations of the GC.Collect() (EWWWWWWWW) to supposedly free up some of the memory consumed by some large objects.

Blah blah blah. The point is I have had to become a lot more familiar with garbage collection and memory management in general. I figured I would post what (I have found) to be the best sources for information on this topic, in the order I think it's best to read them. Some of these refer to each other and I am merely following the order suggested by them. Others, I am simply including the order that seemed to make the most sense to me. I am extremely confident that after you read these articles, you will have a great handle on memory management and how the garbage collector work in .net.

I'm also including, as a bonus, this article which goes very deep into resource management using dispose and finalize. I went ahead and tagged this as architecture as well since I believe any good architect should want to know about the underlying framework.
 
Enjoy!
 
[edit] I'm going to tack a +1 onto this stack because I forgot I read this one somewhere between 1 and 6 and I found it helpful. If you read the above though, it's not really necessary.
Filed under: , ,

Comments

# Top 20 .NET Garbage Collection Articles

Friday, June 22, 2007 12:15 PM by DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# Top 20 .Net GC Articles

Saturday, June 23, 2007 12:11 PM by DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# Articoli sul Garbage Collector

Tuesday, June 26, 2007 2:58 AM by Around and About .NET World

# links for 2007-06-26 | IndianGeek

Tuesday, June 26, 2007 6:31 PM by links for 2007-06-26 | IndianGeek

Pingback from  links for 2007-06-26 | IndianGeek

# Using ICloneable - Why and How

Friday, July 06, 2007 9:39 AM by Kelly White

As I've mentioned earlier, I have a long commute to and from work each day. Each day as I ride the

# GC and IDisposable

Sunday, February 03, 2008 11:22 PM by Kelly White

Here's a post I was going to write on July 10th of last year. This morning I finished reading the

# GC and IDisposable

Sunday, February 03, 2008 11:23 PM by Kelly White

Here's a post I was going to write on July 10th of last year. This morning I finished reading the

# CLR Profiler

Saturday, June 28, 2008 3:57 AM by Thomas Huijer

Hij is al een lange tijd uit, maar van de week had ik 'm voor het eerst echt nodig: de CLR Profiler

# .NET 垃圾回收 处理内存

Thursday, August 14, 2008 11:09 PM by qizxf

下面是我翻译的一篇文章的部分,大概说明了.NET 垃圾回收的机制 1.所有的能被垃圾回收的对象被分配到一个连续序列的地址空间中。 2.这个堆被分割生成,因此这使的仅仅依靠查找堆中的一小部分就消除大多数的垃圾