Thursday 3 October 2013

.NET CLR - Garbage Collection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Finalization Queue

 

Finalize is a special method that is automatically called by the garbage collector (GC) before the object is collected. This method is only called by the GC. Destructor in C# are automatically translated into Finalize. You can see the IL code using IDASM where you will see that destructor is renamed to finalize.

 

image

 

 

image

 

 

image

 

 

image

 

 

image

 

 

image

 

 

 

Blogger Labels: Garbage,Collection,Finalization,Queue,Finalize,method,collector,Destructor,IDASM

No comments:

Post a Comment