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 assembly version series sequence?
Is c# int immutable?
What is the advantage of constructor in c#?
Is stringbuilder thread safe c#?
How do you create partial methods?
What is a linked list c#?
Which property of the textbox cannot be changed at runtime?
What is parameterized constructor?
What is Wrapper class in dot net?
What is wpf c#?
Is c# lazy thread safe?
What is access modifier in c#?
What is an array? Give the syntax for a single and multi-dimensional array?
What is data reader in c#?
What are data types with examples?