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
How can I check the type of an object at runtime?
What is the usage of OLE?
What is #region in c#?
How to find the current application file path while runtime?
Is c# a keyword?
What is type keyword in c#?
What is difference between yielding and sleeping?
What is overriding in c#?
what is IDisposal interface
What is xaml in c#?
Write a program in c# to find the angle between the hours and minutes in a clock?
What is sqlcommandbuilder c#?
What is the main usage of keyword “virtual†? How does it work for a method or property?
What is serializable in c#?
what is a constructor? What is a destructor?