Be careful with hidden cost of std::vector for user defined objects

While creating and using std::vector with user defined classes we needs some special care otherwise it can hamper the performance of our application.