Conclusion
The inclusion of automatic memory management and garbage collection in the .NET Framework eliminates the most common error that programmers make in their codethat of memory leaks. However, there are many more types of scarce resources that can leak, and for which the .NET Framework provides no automatic management. Programs that use unmanaged resources should use the Dispose design patternand classes that implement or provide access to these resources should implement itto ensure that resources are managed properly.