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 it not possible to store a boolean value as a variable?
Explain how do I convert a string to an int in c#?
what happens if you inherit multiple interfaces and they have conflicting method names?
Is c# an open source language?
Can we overload indexer in c#?
What is sqlcommand in c#?
What's the difference between class and object?
What is sql transaction in c#?
How do you type a null character?
Contrast System.String and System.Text.StringBuilder classes?
What does assert() do in c#?
What is access specifier in c#?
Is c# a strongly-typed language?
What is native image generator (ngen.exe)?
What is datacontract in c#?