Item-16 Use the same form in corresponding uses of new and delete
· โ 2 min read
If you use [] in a new
expression, use [] in the corresponding delete
expression; If not, no [] in the matching delete
expression.
If you use [] in a new
expression, use [] in the corresponding delete
expression; If not, no [] in the matching delete
expression.
Copying an RAII object entails copying the resource it manages, so the copying behavior of the resource determines the copying behavior of the RAII object.