new expression : new 表達(dá)式
operator new : 操作符函數(shù),用來分配內(nèi)存.
3 placement new :定位表達(dá)式,用來初始化已分配的內(nèi)存.
第一種用法 : type a = new type;
第二種用法: void *a = ::operator new(int size);
第三種用法:
用法: new (place address) type [initialiser list]
如: void * a = malloc (xxx);
new (a) a_type ;