you simply have a reference to this vector right?
Yes, people always are confused about vector itself and data that vector holds. If you are not allocating vector object with new operator, vector itself will be created in stack but still their data will be held in heap.
std::vector allocates on the heap.
Обсуждают сегодня