deep-clone

How to deep clone interconnected objects in C#?

What is the best way to deep clone an interconnected set of objects? Example: class A { B theB; // optional // ... } class B { A theA; // optional // ... } class Container { A[] a; B[] b; } The obvious thing to do is walk the objects and deep clone everything as I come to it. This creates a problem however -...

Does Scala AnyRef.clone perform a shallow or deep copy?

In Scala, does AnyRef.clone perform a shallow or deep copy? ...

What is the easiest way to deeply clone (copy) a mutable Scala object?

What is the easiest way to deeply clone (copy) a mutable Scala object? ...