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 can you clean up objects holding resources from within
the code?

Answer Posted / nagasaichand

The recommended practice is to implement both Finalize as
well as Dispose methods on an object which needs to clean up
unmanaged resources. The Finalize method would serve as a
backup mechanism in the event that the Dispose is never
called. The garbage collector would perform the object
finalization and prevent a permanent leak of the unmanaged
resource.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a delegate? Explain.

944


What is wpf c#?

880


Write down the c# syntax to catch an exception

940


What is the difference between string and string in c#?

984


Why do we use delegates in c#?

917


How do I create a multilanguage?

922


What are the variables in c#?

948


What is expandoobject in c#?

898


What is interface inheritance?

957


How many destructors can a class have?

1035


What is the default modifier for class in c#?

967


How to properly clean up excel interop objects?

938


Why to use lock statement in c#?

937


Explain different properties of object oriented systems.

984


What are the drawbacks of extending an interface as opposed to extending a class?

890