Code: Select all
void argh()
{
int *ii = new int[1000];
delete [] ii;
}
I've traced the execution as follows:
- new int[1000] calls operator new[] in newaop.cpp.
- operator new[] calls operator new in ogre's memory manager.
- delete [] calls ogre's version directly.
- memory manager sees that the memory was allocated with new and removed with delete [], and asserts.
newaop is part of vc which for some reason is inserting itself in so that it intercepts an array allocation and changes it into a non-array allocation.
I'm using VS.Net 2003. I've tried both ogre 0.15.1 and 0.15.2.
I tried putting the ogrenomemorymacros.h include just above the argh function, it made no difference (ogre memory manager still called for both, with the new [] still being converted by newaop.cpp).
There's no problem with that code if it's in my main application, it only freaks out when it's in a dll. And it's just a standard dll made with the project wizard, I haven't played with freaky settings or anything.
Anyone have any ideas what I'm doing wrong? Or how to disable the damn newaop.cpp from intercepting new []?
