Flashcard Details
CPlusPlus
What is the difference between a shallow copy and a deep copy?
Shallow copy copies only object's memory references, not the actual data. Changes to original affect the copy if shared resources are modified. A deep copy duplicates actual data, creating independent objects. Changes to one don't affect the other.
1
1