| Start |
|---|
| In a class that contains only managed resources Managed resources are resources that the runtime's garbage collector is aware and under control of. There are many classes available in the BCL, for example, such as a It's not necessary to implement a finalizer if your class only contains managed resources. |
| In a class with managed and unmanaged resources It's important to let finalization ignore managed resources. The finalizer runs on another thread -- it's possible that the managed objects don't exist anymore by the time the finalizer runs. Implementing a protected |
| IDisposable, Dispose .NET Framework defines a interface for types requiring a tear-down method:
When you need to directly access unmanaged resources such as unmanaged pointers or win32 resources, create a class inheriting from |
| using keyword When an object implements the
|
| In an inherited class with managed resources It's fairly common that you may create a class that implements Remarks |
Read Article
https://develop.horje.com/learn/1434/reference