>>125
> if ( (ptr = new char [サイズ]) == NULL ) { // (2)
C++ は new も vector::push_back も bad_alloc が飛ぶ。ふつうの new は nullptr 返さない。