Answer Posted / prashanth s
Actually the freeing of the memory is done by the CLR
automatically by calling the garbage collection routine.
But the declared objects by the user can be deallocated
manually by using dispose function in the class by
implementing IDisposable interface in the object class.
Otherwise it can also be done by implementing a destructor
in the class, as the destructor defined will help
deallocating the object allocation after the usage of the
object gets over, i.e the object is not used anywhere else
in the program.
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?
What are generics in c#.net?
What is main thread in c#?
What is the difference between string and stringbuilder in c#?
Does the variables of a private class-level inherited?
What is the use of getcommandlineargs() method in c#.net?
In c#, what will happen if you do not explicitly provide a constructor for a class?
Is linkedhashset synchronized?
Define thread? Explain about multithreading?
What is polymorphism c# example?
Which is faster dictionary or list?
What is using directive in c#?
What is difference between static and readonly in c#?
What is use of FormBoarderStyle Propertie
What does writeline mean?