Bill Blogs in C#

Bill Wagner discusses C#, LINQ, and other items of interest

Browse by Tags

All Tags » GC (RSS)
Yet another good explanation on the pitfalls of Finalization
Brian Grunkmeyer has written a rather deep article for the BCL weblog that discusses many of the pitfalls that surround finalization, dispose, and weird things that can happen during the birth, death, and possible resurrection of an object: http://blogs...

Posted by wwagner | 1 comment(s)

Filed under: ,

Should you make static variables using Disposable types?
A question with two answers: No, and Occasionally. I received this question last week: I'm still working through and enjoying "Effective C#", unfortunately my job has really intruded for the past 2 months. I'm at Item 18: "Implement...

Posted by wwagner | with no comments

Filed under: ,

GC.SuppressFinalize in constructors?
SQLConnection, for one, calls GC.SuppressFinalization() in its constructor. Why would you do that? A fried of mine asked about the practice of calling GC.SuppressFinalize() in a constructor. He noticed it in the SQLConnection constructor. It’s also...

Posted by wwagner | with no comments

Filed under: ,

Eugenio Pace comments on IDisposable
Quote: "Why should a developer building "business solutions" ever care about closing a connection to a database, or even opening it?" Eugenio has an interesting take on IDisposable, or the needs for business developers to actually...

Posted by wwagner | with no comments

Filed under: ,

Question and Answer on Non-Deterministic Finalization
Always close files and streams Question : I read your article Manage C# Objects in Visual Studio magazine. I'm having a problem using the XmlDataDocument class and was wondering if you think this is a situation where I should use IDisposable as described...

Posted by wwagner | with no comments

Filed under: ,

Q & A On IDisposable and Memory Management
Wasn't this supposed to be easier? Hi Bill I am an independent MSCD for Microsoft .NET, and I always enjoy your writing. Your article beautifully explains the Dispose application implementation pattern. However, there is one important aspect which...

Posted by wwagner | with no comments

Filed under: ,