0

what is the difference between deep copy of an object with copy constructor and using object.clone() ? Copy constructor is very easy to use but I wonder if there are any limitations. Also what is the difference between deep copy and deep clone ?

Bimal Sharma
  • 134
  • 14
  • Possible duplicate http://stackoverflow.com/questions/6182565/deep-copy-shallow-copy-clone ? – anacron Dec 30 '16 at 08:25
  • One is called by `new Object(instance)` the other is `instance.clone()`. Using a Constructor might simply take some value to build a different instance, clone SHOULD build the exact same instance. – AxelH Dec 30 '16 at 08:26

0 Answers0