Can anyone please tell me how I can free objects in C#? For example, I have an object:
Object obj1 = new Object(); //Some code using obj1 /* Here I would l
You don't have to. You simply stop referencing them, and the garbage collector will (at some point) free them for you.
You should implement IDisposable on types that utilise unmanaged resources, and wrap any instance that implements IDisposable in a using statement.
IDisposable