How do people normally manage copying a list of large objects around?
Here's my situation:
Currently I have this:
typedef std::vector<float> Image;
and I'm storing it in a
std::list<Image> lst;
The Image.size() is quite large (each is ~3-5 MB).
I'm passing (copying) the list around.
Is it a correct understanding on my part that std::vector will copy each element by value? If so, the performance might be a bit awful due to excessive copying?
What can I do to minimize copying? Should I instead store
std::list<ImageRef> lst;
where
typedef boost::shared_ptr<Image> ImageRef;
?
What's the elegant way of handling this kind of issue?