Why is it preferred to not use finalize for clean up?



Why is it preferred to not use finalize for clean up?..

Answer / Gyanendra Pratap Singh

Finalize methods in .NET can lead to performance issues, memory leaks, and unpredictable behavior due to the possibility of multiple garbage collections, making Dispose() methods a better choice for cleaning up resources.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

How to disable validator control by client side JavaScript?

1 Answers  


what is machine key error in asp.net? how to solve it?

1 Answers  


how to debug web services on consumer side?

1 Answers   HCL,


Is asp.net outdated?

1 Answers  


How many types of sessions in asp.net?

1 Answers   MaxSolPro,


What is the base class from which web forms are inherited?

1 Answers  


What are the events in a page life cycle?

1 Answers  


How to stop the inheritance?

2 Answers   TCS,


What is mvc in angular?

1 Answers  


accessing a textbox that was created dynamically? for (int i = 0; i < t1; i++) { TextBox t2 = new TextBox(); t2.ID = "adf" + i; PlaceHolder1.Controls.Add(t2); } accessing data entered in the above created controls.

1 Answers  


What is an example of an application service provider?

1 Answers  


How do you do exception management?

1 Answers   Accenture, BirlaSoft,


Categories