Hello all,
I would be most grateful for your help. What I want to do in my application is to override new and delete not just for one class, but for the entire application. C++ allows you to do that by defining global versions of these operators. Here’s how I override global new and delete:
void* operator new (size_t size)
{
void *p = malloc(size);
return p;
}

void operator delete (void *p)
{
free(p);
}
The behavior I am facing after I have overridden global new and delete in this way is that at the beginning of the application (initialization that takes place before the event loop has been started) the overridden new is being invoked on some objects (not all), but after the event loop has started there is no invocation of the overridden new operator although there are objects that are dynamically created.
I would appreciate any suggestions on this issue.
Regards,