Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How we free the memory in C#.NET.

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


Please Help Members By Posting Answers For Below Questions

In which order the constructor is called for an inherited class?

1117


How many types of polymorphism are there?

989


Can int be null in c#?

934


What is static classes in c#?

1064


How to add controls dynamically to the form using c#.net.

945


What are Memory foot print of an exe?

1085


What happens if a static constructor throws an exception?

997


What is system predicate?

946


Why constructor is used in c#?

950


Are cao stateful in nature?

965


What is a virtual property. Give an example?

987


What are the types of class in c#?

1162


How many types of interface are there in c#?

1036


Explain Constructor and destructor?

1015


Do unused Namespaces in c# affect run-time performance?

1096