- Joined
- Jun 26, 2017
- Messages
- 886
Is there an easy way to copy an instance? Make a clone object?
Until now I just copied all the Fields to a new object of that class, but this time my class has some collections/arrays in it, I wanted to know if there is an other way.
BTW: Am I correct with this: "=" assigns only values (copies) for int, float, string types and it assigns something pointer like to arrays, objects (incl. maps, stacks, lists)?
Until now I just copied all the Fields to a new object of that class, but this time my class has some collections/arrays in it, I wanted to know if there is an other way.
BTW: Am I correct with this: "=" assigns only values (copies) for int, float, string types and it assigns something pointer like to arrays, objects (incl. maps, stacks, lists)?