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
Name the method of servicebase class?
What is firstordefault c#?
What's the difference between system.string and system.text.stringbuilder classes?
What are annotations in c#?
What is collection class c#?
Can a constructor be static in c#?
How main method is called in c#?
What is action c#?
What is an extension method in c#?
What is decimal in c#?
What is the default value of boolean variable?
What is the difference between “out” and “ref” parameters in c#?
What is the advantage of dependency injection?
List some of the classes used by system.data namespace?
How do you determine whether a string represents a numeric value?