1.

Why Is It Not A Good Idea To Use Empty Destructors?

Answer»

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.

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.



Discussion

No Comment Found