以下所有陈述是否正确?
vector<Type> vect; //allocates vect on stack and each of the Type (using std::allocator) also will be on the stack
vector<Type> *vect = new vector<Type>; //allocates vect on heap and each of the Type will be allocated on stack
vector<Type*> vect; //vect will be on stack and Type* will be on heap.
如何Type
在一个vector
或任何其他STL容器中内部分配内存?
1
类成员和显式堆栈/堆分配的
—
underscore_d