jeudi 31 mars 2016

Prototype pattern in C++

I read about the Prototype Pattern and I think I pretty much understand it. But I need some real example for this pattern to fully understand. In all examples I saw a copy constructor and new in the clone() function to create a new object from an already existing one. All the descriptions say that this pattern is more efficient. It is also creates a new object using the new operator.

But how is it more efficient ?

Or when shall I use this ? When could it be more efficient ?

Aucun commentaire:

Enregistrer un commentaire