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

Rule:  OLC#013Checked automatically with code checker

This rule is Obsolete
Synopsis:Data members do not have to be reset in a destructor
Language:C++
Severity Level:7
Category:Object Life Cycle


Description:

A destructor must typically release any resources that an object has in use. For instance, it deletes dynamically allocated memory. Resetting data members in a destructor, such as setting a long to 0, is useless. This is because data members are no longer used after the destructor has been called.