I have class A, then I made a vector of class A;
std::vector<A> b, and i initialize it correctly.
I have one member function of another class, which has a member pointer which point to a
vector of A;
In this class, I also have a member function, and inside this member function.
I fist build a reference to the vector of class A, and initialize it use the deference of the pointer, The reason is the member reference can only assign value once, so I use pointer, but inside the member function, the syntax of reference is more clean.
the question is, in the member function, if i delete the reference to that vector, does it only delete the reference or delete the whole container the pointer point to. The container contain object not pointer.
Thanks
When the reference goes out of scope it’s not going to destroy the original object.
I assume this is the situation: