This is related to the mechanism of std::shared_ptr. Here, values stores a reference to a vector, which will be released after storage_iterator destruction. Saving this reference ensures that as long as storage_iterator survives, the reference objects (values) bound to the iterator will also survive.
Cannot be deleted.
This is related to the mechanism of std::shared_ptr. Here, values stores a reference to a vector, which will be released after
storage_iterator
destruction. Saving this reference ensures that as long asstorage_iterator
survives, the reference objects (values) bound to the iterator will also survive.Do you want to delete the initialization of values in the constructor or delete the entire values member?
..........After deleting it, what do you use this class for?