Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Any way to check size of dynamically allocted array in debug mode?
kitfox last edited by kitfox
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.
JonB last edited by
If you mean it's been allocated via e.g.
new floator 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.