c++ standards smart-pointers auto-ptr unique-ptr
可能重复: 在任何情况下new都会返回NULL吗?
说我有一个类Car,我创建一个对象
Car *newcar = new Car(); if(newcar==NULL) //is it valid to check for NULL if new runs out of memory { }
c++ new-operator
c++ ×2
auto-ptr ×1
new-operator ×1
smart-pointers ×1
standards ×1
unique-ptr ×1