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 |
how to use caching in our program. why we use it give one example in code
What is join in c#?
Why we use delegates in c#?
How do you declare a method in c#?
What is the use of delegates in c#?
What is disconnected data architecture in c#?
What is the Difference between directcast and ctype?
What is for loop in c#?
What is the difference between delegates and superdelegates?
I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?
What is writeline in c#?
What is the concept of strong names?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)