Reputation: 53263
I was reading about Prototype creational design pattern and came across an information that points out the less expensiveness of cloning the object THAN creating a new one -via calling new operator.
Is this true and if yes, why is that?
Thanks
Upvotes: 0
Views: 271
Reputation: 726839
Cloning does require creating a new object, so you are not going to save much on the creation portion of the initialization. However, you may save on other elements of initialization:
Upvotes: 2