Can this if (_cpDC != 0) delete _cpDC; // free the DC be simplified now to this delete _cpDC; // free the DC ?