So I have this code down there which is a dummy version of my main code and is supposed to create an object stored in a vector. Since the object goes out of scope when the c