15 years ago
No class names for objects created using operator new[]
I'm using the allocation profiler and hit a snag. I switched the container for one of my most allocated class from an stl vector to a standard array created with operator new[]. After doing so, the class name no longer shows any memory allocations in the results panel (either objects or classes). Instead, it's lumped in with C++ native memory and is therefore nearly impossible to track. What's even more odd is that if I allocate a single object it is tracked. For example:
CMyClass* pArray = new CMyClass[1000]; // not tracked
CMyClass* pOne = new CMyClass; // works fine!
Any ideas?
CMyClass* pArray = new CMyClass[1000]; // not tracked
CMyClass* pOne = new CMyClass; // works fine!
Any ideas?