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 Implementation inheritance
How to properly clean up excel interop objects?
Which is faster iqueryable or ienumerable?
What is string [] args in c#?
What is c# commonly used for?
What is expression tree in c#?
Why is it called c sharp?
what is virtual method in c#?
How to use the sreamReader class to read form a text file?
What are delegates and why are they required?
What is string literal in c#?
What is the meaning of extention?
Why do we use delegates?
What is getenumerator?
Why do we need generics in c#?