Showing results for February 3, 2004 - The Old New Thing

Feb 3, 2004
Post comments count0
Post likes count0

Mismatching scalar and vector new and delete

Raymond Chen
Raymond Chen

In a previous entry I alluded to the problems that can occur if you mismatch scalar "new" with vector "delete[]" or vice versa. There is a nice description of C++ memory management in C++ Gotchas: Avoiding Common Problems in Coding and Design on www.informit.com, and I encourage you to read at least the section titled Failure to Distinguish Sca...

Code