Unsolved Any way to check size of dynamically allocted array in debug mode?
-
I have an application that I suspect is reading past the end of a float* buffer. Is there any way to see how many bytes have been allocated to this buffer when I've stopped at a breakpoint?
-
Use a std::vector / QVector instead plain memory.
-
@kitfox
If you mean it's been allocated via e.g.new float[100]
or similar, then no. As @Christian-Ehrlicher has said, you would need to use a class like a vector which notes how big the allocation is and contains code to do bounds checking.