Sunday, March 6, 2011

How to overload new and delete operator


void* __cdecl operator new(size_t size)
{
 return malloc(size);
}

void __cdecl operator delete(void* p)
{
 free(p);
}

No comments: