In the following code, there is a memory leak if Info::addPart1() is called multiple times by accident:
Info::addPart1()
typedef struct { }part1; typedef struct { }
Option 1: Use Java :)
Option 2: Use auto_ptr
std::auto_ptr _ptr1; std::auto_ptr _ptr2; public: addPart1() { _ptr1 = auto_ptr(new part1); } ... // no destructor is needed