How to copy an object, and then compare it to the original to see if it has changed?
===

I need to execute functionality whereby if the user is going to close the window (or perform some other action) without saving their changes, they are going to be informed with a message box.

In order to be able to do this, I need to be able to know whether changes have been made to the object in question since the window was opened.

I'm thinking a way to do this is to create a copy of the object when the window loads and keep it as `_original` and then before the window closes I can compare it against the object that may or may not have been changed.

What is the best way to copy the object into `_original`, without both of them simply having a reference to the same place in memory?

Also, what is the best way to compare the two objects after, to see if the object is different than `_original`?