-The problem-
In a game (Model-View-Controller design) that I'm programming to practice with the (optimization?) of object creation, I want to create an object, and use that object to create clones. I do not want the clone's addresses to reference to the original object.
By what means can I create a series of clones that do not reference to the original object? (I believe the terminology is called "dereference".)
-In my code-
I have an EntityLibrary which instantiates and stores one instance of each kind of Entity child that I have (ie. Cat, Dog, Fish). Each individual Entity child in the EntityLibrary is meant to be retrieved by the Model class when the Model class decides that it needs a clone of that Entity child.
The problem that I'm running into is that the address of the Entity child's clone references to the same address of the original Entity child located in the EntityLibrary.