0
comment
comment
on 9/25/2011 12:30 PM
Dispose
In order to release unmanaged resources you need to use or implement the dispose method.
Unmanaged resource
So what is an unmanaged resource? It is simply resources that the CLR does not manage for you. For example: File streams, database connections, P/Invoked api:s.
How to implement Dispose?
Msdn gives a rather clear answer.
You need to implement the IDisposable interface.
If you have implemented a finalizer as well then you need to add a call to GC.SuppressFinalize inside the dispose [...]