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
Is c# easier than javascript?
What is c# entity framework?
What is the difference between abstract and abstraction?
what are the differences between a class and structure
How to properly clean up excel interop objects?
Name some properties of array.
What are the features of c#?
What is thread life cycle in c#?
Can we call server-side code (c# or vb.net code) from javascript?
Explain about Serialize and MarshalByRef?
What is the difference between finalize() and dispose() methods?
What is the difference between readkey and readline in c#?
What is a statement c#?
What is delegates and events?
Could you explain the difference between func vs action vs predicate?