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 are the differences between value types and reference types?

1198


Explain the constructor in c#.

1152


Are enums static c#?

1031


Why attributes are used in c#?

945


Explain the mechanism of VB.NET/C# achieve polymorphism?

1046


What does convert toint32 mean?

1021


What is namespace explain with example?

915


What is difference between dictionary and list in c#?

931


What is disco?

983


Explain streamreader/streamwriter class?

1033


What is the implicit name and type of the parameter that gets passed into the class set method?

925


What is the difference between wrapper class and primitive?

907


We cannot create instances of static classes. Can we have constructors for static classes?

1059


What do you mean by delegates and explain different types of delegates?

1011


What are the three types of operators?

1033