Using IDisposable objects responsibly – the easy way

added by alexdresko
7/26/2010 11:55:10 AM

0 Kicks, 86 Views

How many times have you complained about how much repetitive code is required to properly dispose of objects in your code? How many times have you found yourself in a situation where you’re unsure whether or not you’re even supposed to dispose of an object in the first place? I want to show you a technique which completely (or, at least, temporarily) avoids the need to bother yourself with those very important concerns. This is an extremely powerful technique which can be used for much more than dealing with IDisposable related issues, but that seems to be the scenario I use it on most often.


0 comments