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 does bitwise xor work?
What does console writeline do?
Will the following code compile and run?
What is data hiding in c#?
Is array passed by reference in c#?
List out the differences between array and arraylist in c#?
The int maps to which C# keyword in .NET type?
What is deferred execution in c#?
What is c# in asp net?
Explain the functionalities of satellite assembly?
Is inheritance possible in c sharp?
Explanation on Generic?
How do you pass reference parameters in c#?
What is the console on a mac?
What is deadly diamond problem?