Template talk:cpp/memory/example1

Can someone please double-check my edit? I'm not sure it's correct. I've replaced the `for` loop with two algorithm calls.

The `for` loop iterated over the raw storage, outputting every string element to standard out and then explicitly calling the `basic_string ` destructor. I replaced that with a `std::copy` to output the strings and a `std::for_each` to call the destructors. Is it okay to capture the elements by const-reference in the lambda, to call their destructor?