← Back to team overview

kicad-developers team mailing list archive

SAFE_DELETE

 

wxstruct.h

//C++ guarantees that operator delete checks its argument for null-ness
#ifndef SAFE_DELETE
#define SAFE_DELETE( p ) delete (p); (p) = NULL;
#endif


1) what is this?

2) why it is needed?

3) why cannot i put it after an if() statement (trick question)?


I don't like it.

Dick





Follow ups