|
What is difference between deep copy and shadow copy in Array? |
Posted Date: 02 Sep 2004 Posted By:: Srinivasan Member Level: Bronze Member Rank: 0 Points: 2
Responses:
1
|
What is difference between deep copy and shadow copy in Array?
|
Responses
|
#3422 Author: Matt H Member Level: Bronze Member Rank: 0 Date: 02/Sep/2004 Rating:  Points: 2 | A deep copy has mostly do to with pointers and dynamic memory allocations. A deep copy will copy the actual values that are pointed to. A shallow or shadow copy copies the address where the values are stored. The problem comes into play when what you really wanted was a deep copy but you actually did a shallow copy. You go an change the values in the newly copied array and you changed the value of the copied array.
Hope this helps.
|
|
Post Reply
|
|
 | | This thread is locked for new responses. Please post your comments and questions as a separate thread. If required, refer to the URL of this page in your new post. |
|
|
|