Introducing the Concepts It is easy to get a bit confused when trying to figure out what resources you need to free explicitly and how to release the resources that your class has created or is holding references to. You will find that there is something called Finalizer , a clean-up pattern called The Dispose Pattern, and a special Deconstruct method that you can declare. In most cases though, you don't have to do anything and just let the Garbage Collector (GC) do its thing. However, if your class allocates unmanaged memory, open file handles, network sockets, database connections or similar, you need to ensure that these are properly closed and freed before the references are removed. I will go through the different concepts and hopefully clear out how to ensure that all resources are properly freed in your application. The Deconstruct method You might say that it is incorrect to even mention the Deconstruct keyword/method in this post, since it actually have nothing ...
Välkommen till Vi's underbara värld ;)
SvaraRaderaTack tack. Nu kör jag dock mest Visual Studio fast med Vi key bindings.
Radera