PDA

View Full Version : What is the finalize block in .net ?



Shivangi Panwar
07-29-2016, 11:17 PM
What is the finalize block in .net ?

pxljobs
08-18-2016, 12:16 AM
It will belong to object class,automatically called garbage collection mechanism object go out of scope also it is an slower methods not suitable for instant disposing object,it is an non deterministic function.

aceamerican
02-06-2017, 05:10 AM
Finalize method is used to perform cleanup operations on unmanaged resources held by the current object before the object is destroyed

swikriti.sharma
01-17-2018, 10:41 PM
The Finalize method is used to perform cleanup operations on unmanaged resources held by the current object before the object is destroyed.

jackar56
02-01-2018, 03:28 AM
Object.Finalize method in .NET is typically used to clean and release unmanaged resources like OS files, window etc. Even though Garbage collector in .NET has the ability to determine the life time of such objects, however, with no knowledge how to clean them. The Finalize method allows an object to clean up such unmanaged resources when the garbage collector wishes to reclaim the memory. However, Finalize method should be avoided until necessary as it affects the performance because reclaiming the memory used by objects with Finalize methods requires at least two garbage collections.

traveloweb
02-11-2018, 11:35 PM
The method is protected and therefore is accessible only through this class or through a derived class.