5,321
edits
Line 141: | Line 141: | ||
// Using smart pointers | // Using smart pointers | ||
std::unique_ptr<std::vector<float>> my_vector = make_unique<std::vector<float>>(99); | std::unique_ptr<std::vector<float>> my_vector = make_unique<std::vector<float>>(99); | ||
my_vector | my_vector.reset(); | ||
// Copy-and-swap idiom | // Copy-and-swap idiom |