The pains of compiled libraries is never knowing exactly how the memory is managed. I'm lead to believe that vector's elements are placed on the heap unless explicity told not to.
Being placed on the heap, it obviously needs to be deleted when it is no longer used, which seems to happen when the vector object is deleted.
The question is when the at(#) or operator[] is called does it delete the memory being replaced?
For example:
std::vector<string> secretlyAnArray(5);
secretlyAnArray.at(0) = std::string("Does this memory leak?");
secretlyAnArray.at(0) = std::string("When I overwrite the object?")
Happy to learn better methods to replace data at a specific index of a vector, or just pointing at the documentation that explains it.
Edit 2: After the helpful comments of Anis and Daniel which are much appreciated; it appears that at(#) returns a reference, which then standard reference rules apply rather than governed by the behavour of vector.