Item-14 Copy behavior in resource-managing classes
· โ 4 min read
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.
Item-13 Use objects to manage resources
· โ 3 min read
Item-12 Copy all parts of an object
· โ 3 min read
Item-11 Handle self assignment in operator=
· โ 4 min read
Solve self assignment situation in operator= by comparing addresses of source and target objects, careful statement ordering, and copy-and-swap
.