Results 1 to 3 of 3

Thread: Shallow Copy

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Posts
    382

    Shallow Copy

    When you Clone a SortedList, Do any changes in the Main SortedList reflect the clone? I understand that the shallow clone will still reference the real objects but the cloned list wont be in sync with any changes done to the real list, is this correct?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Changes in the either list (Add,Remove,etc) will not be reflected in the other.

    However, any reference type objects that were contained in the original list when it was cloned will be referencing the same object in the cloned list. So changes to the individual objects will be reflected in both lists.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Posts
    382
    Thank You!
    That's what I need to know..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width