Added some diagnostic messages when allocation fails.
Merge branch 'cpp_new_delete' into delete_only_on_destructor