Is the lack of deterministic destruction in .NET a problem

Answer Posted / kirti

It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way for the client to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is page life cycle?

694


what is .edmx file and what it contains?

782


what is explicit loading?

847


What is a model in programming?

745


What are actions in asp.net mvc?

793


What is connected scenario? : Entity framework

734


How we can register the Area in ASP.Net MVC?

855


What are the levels at which filters can be applied in an asp.net mvc application?

780


Explain the advantage of packaging over xcopy in .net?

740


What are actions in mvc?

748


What is Layout in ASP.Net MVC?

784


How to change the action name in ASP.Net MVC?

780


What is disconnected scenario? : Entity framework

751


What is the mvc pattern (model view controller pattern)?

767


What is ViewData and TempData in ASP.Net MVC?

769