 <blockquote> <p>Are these calls equal in terms of performance?</p> </blockquote> <p>In C++11 with the new move semantics, the performance is about the same. If you are using your own classes, make sure they implement a move constructor and a move assignment operator.</p> <blockquote> <p>In the case of storing a vector of B objects in type A, would it be more efficient to pass a nameless object of type B, store them in the vector, and return pointers to the vector elements, or to create an object of type B, and pass a pointer to storage.add() and store my objects of type B in a vector of pointers?</p> </blockquote> <p>If you're refering to STL vectors, the best performance will be achieved with anonym objects, because otherwise, your object will be copied, as STL stores values, not references.</p> <p>The rule of thumb for returning objects from a collection is to return them by <em>reference</em>. That's the pattern followed by STL <a href="http://www.cplusplus.com/reference/vector/vector/at/" rel="nofollow">vector</a></p> <p>When you store pointers instead of values, you are changing the ownership of memory to the client of the vector class, because, normally, who creates an object should be responsible for deallocating it too.</p>