#include <new>
using namespace std;
int main()
{
int* p=new int; //A
int* q=(int*)operator new(sizeof(int));//B
delete q;
operator delete(p);
return 0;
}
A和B都是调用<new>里声明的操作符
__bcount(_Size) void *__CRTDECL operator new(size_t _Size) _THROW1(std::bad_alloc);来在堆上分配空间的,
谁能把A的隐式调用比B的显式调用多的步骤所需要的代码贴出来看看?
撒科打诨