[C# Howto] How to Build Disposable Objects

You know that it is not a good practice to use destructors to clean up your objects. You are not supposed to disrupt the garbage collection process either. The “System.Object” class has the “Finalize()” method. But in C#, you cannot override this method. You need to use the destructor instead.

So how do we cleanup used objects or resources?

Continue reading