grauzone wrote: > > class A { > B b; > } > > class B { > A a; > } > > auto a = new A(); > auto b = new B(); > a.b = b; > b.a = a; > > Your recursive approach wouldn't quite work with that. Before cloning an > object, you'll first have to check if the object was already cloned. If > this is the case, use the previously created clone instead of making a > new clone.
You are right. This case must be considered separately.