Lets see, what happens when you create and destroy an object. Here we have created an object like this: TextBox msg=new TextBox(); // TextBox is a reference type From your point of view, …
Read More »Garbage Collection and Resource Management In C#
What is garbage collection In C# ?
In computing, garbage collection (also known as GC) is a form of automatic memory management. The garbage collector attempts to reclaim the memory used by objects that will never be accessed again by the application. …
Read More »Resource Management In C#
Sometimes it’s inadvisable to release resource in a destructor; some resources are just too valuable and too scarce to lie around unreleased for arbitrary lengths of time. In the situations, your only option is to …
Read More »