What is Finalizer in .NET define Dispose and Finalize ?



What is Finalizer in .NET define Dispose and Finalize ?..

Answer / Shikha Shukla

[n A finalizer, also known as a destructor in C++, is a method automatically called by the garbage collector when an object with a finalizer is about to be destroyed.nn The Dispose method is a user-defined method that releases resources such as file handles, network connections, or unmanaged memory before an object is garbage collected. It can be explicitly called by the user to free resources prematurely.nn Finalization and disposal are two different concepts: finalization is performed automatically by the garbage collector, while disposal should be called manually whenever possible for optimal performance.n]

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

What is SOAP? How you will do windows and forms authentication?

1 Answers   Wipro,


How do we access crystal reports in .net?

1 Answers  


What is .net technology?

1 Answers  


What is strong name?

2 Answers  


What?s SingleCall activation mode used for?

1 Answers  


Is there any attempt system for microsoft technology papers?

1 Answers  


I have a problem in installing visual Studio 2008 on PC that have Celeron Processor ? afterAll InstallionFaied . Pls suggest me . Is it possible or not .if Yes then How ?

1 Answers  


What are Sessions?

2 Answers   Deloitte,


Explain what is an anonymous method and how is it different from a lambda expression?

1 Answers  


What is .net environment?

1 Answers  


Tell me about secure socket layer? How to make use of the technology?

1 Answers  


Can you create instance of a class which has private constructor?

1 Answers  


Categories