How do i make an copy/clone of an object.
E.g. i want to copy vars from one existing object to another existing object.
This works as long as i do not free the object i copied from.
How do i make a real copy with values instead of references? So that i can free the object i copied from and continue using the object i copied to.

Thanks for your help in advance.