What is the use of finalize and dispose eventhough garbage
collector is working?

Answers were Sorted based on User's Feedback



What is the use of finalize and dispose eventhough garbage collector is working?..

Answer / chinmay shah

We can perform finalize opertaion Immediately after
completing the work and same with dispose also while in
case of garbage collector it will dispose the object, until
it feels they are not in use.

Is This Answer Correct ?    6 Yes 2 No

What is the use of finalize and dispose eventhough garbage collector is working?..

Answer / bharani

Finalize method is actually a the destructor for the
mananged objects, but if you want to destruct an unmanaged
object dispose method allows the programmer to make
explicit calls such as destroywindow to the destruct the
unmanaged object.

Is This Answer Correct ?    3 Yes 0 No

What is the use of finalize and dispose eventhough garbage collector is working?..

Answer / chaitanya

It is advisable not to use the finalize and Dispose
methods,because garbage collector takes Care of the objects
that Should be Disposed.We should use Finalise and Dispose
methods when working with resources in the network or
working with the unmanaged code.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Dot Net Framework Interview Questions

What are Validation Annotations?

0 Answers  


How OS come to know whether to load the .net framework when we run an .exe created using .Net framework?

0 Answers   MCN Solutions,


What is the difference between viewbag and viewdata in mvc?

0 Answers  


What's different about namespace declaration when comparing that to package declaration in Java ?

1 Answers   Infogain,


Is the lack of deterministic destruction in .NET a problem

1 Answers  






What is ViewStart Page in ASP.Net MVC?

0 Answers   B-Ways TecnoSoft,


Explain the advantages of asp.net mvc over asp.net?

0 Answers  


What is Attribute Routing in ASP.Net MVC?

0 Answers  


Why should we go for entity framework?

0 Answers  


What is meant by domain model?

0 Answers  


What is difference between html.beginform and ajax.beginform?

0 Answers   HCL,


Explain the use of Inversion of control (IOC)?

0 Answers  


Categories