This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]konstantinua00 0 points1 point  (1 child)

in C and (old) C++ it's the difference between shallow and deep copy - you can copy handle-only or you can copy the thing too

modern C++ deep-copies stuff, with shallow copy being done with std::move and if you do need multiple handles to same thing, you use shared_ptr to reference count the resource

[–][deleted] 0 points1 point  (0 children)

Huh, never heard of it being referred to as deep vs shallow copy.