TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Rule:  5@122Checked automatically with code checker

Synopsis:Avoid empty finalizers
Language:C#
Severity Level:3
Category:Object lifecycle


Description:

As stated in MSDN, having an empty destructor just causes loss in performance, so should be avoided.

Empty destructors should not be used. When a class contains a destructor, an entry is created in the Finalize queue. When the destructor is called, the garbage collector is invoked to process the queue. If the destructor is empty, this just causes a needless loss of performance.


Literature References:
MS Programming Destructors