fix 2 (possible) memory leaks

Suggestion: change pdbCopy into a boost::scoped_ptr and delete all the manual deletes