hi:
i overload the operator new, codes shown as below:
void * __cdecl operator new(unsigned int size, const char *file, int line)
{
void *ptr = (void *)malloc(size);
return ptr;
}
and when i want to create a class object
CTest::CTest()
{
int a = 0;
}
CTest::~CTest()
{
int b = 0;
}
int main()...
User Profile
Collapse
-
joey started a topic why construction called when i overload the operator new in c++ by calling mallocin Cwhy construction called when i overload the operator new in c++ by calling malloc
No activity results to display
Show More