Is using empty destructors a good practice?

No, using empty destructors is not a good practice, and it 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 simply results in a needless loss of performance.

No comments:

Post a Comment