How we free the memory in C#.NET.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / mayur teli
We can also use Using statement
when we use it, there is no need to explicitly dispose the object. Using statement take care of it.
Is This Answer Correct ? | 3 Yes | 1 No |
Why can?t you specify the accessibility modifier for methods inside the interface?
3 Answers Mind Tree, Siebel Systems,
Why is c# used?
Is lazy thread safe c#?
Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!
Difference between a sub and a function in c#.
What is the solution if you need to manipulate sets of items?
Why do we use classes?
How do I automate my desktop application?
Name the method of servicebase class?
What is static classes?
Distinguish between system.string and system.text.stringbuilder classes?
Which are the loop types available in c#?