Quantcast
Channel: Passion for Coding » IDisposable
Browsing all 5 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

IDisposable and using in C#

C# and the .NET environment have automatic memory management through garbage collection. Coming from C++ I think it’s great to not having to worry about memory deallocation. Unfortunately memory from...

View Article


Image may be NSFW.
Clik here to view.

Implementing IDisposable

In the IDisposable and using in C# post I showed how to handle an object that implements IDisposable. That’s the most common scenario, where a simple using will ensure that resources are properly and...

View Article


Image may be NSFW.
Clik here to view.

Disposable Base Class

I have covered the IDisposable interface in my previous posts IDisposable and using in C# and Implementing IDisposable. To make the implementation of IDisposable easier, I have written an abstract base...

View Article

Image may be NSFW.
Clik here to view.

Using and Disposing of WCF Clients

Designing an interface always requires careful considerations of how it will be used. Scott Meyers elegantly catches the entire problem in one sentence in his book Effective C++: Make interfaces easy...

View Article

Image may be NSFW.
Clik here to view.

Exception Safety and IDisposable Factories

C# is mostly relieved from the stress of exception safety, thanks to garbage collections. But in some cases it must be handled. A common case is factories creating more than one IDisposable object....

View Article

Browsing all 5 articles
Browse latest View live