Two instances

  • Thread starter Thread starter Bernard Bourée
  • Start date Start date
Dennis said:
Doesn't that only work if all fields of the structure are value type. If
one
is a reference type, won't it be just a pointer to the same object as the
copy?

Yes, that's true. What you want to do is a deep copy of the object.
Nevertheless, creating deep copies is non-trivial if there are circular
references.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top