What is the proper way of pushing a new object element onto a std::vector? I want the data to be allocated in the vector. Will this copy the object newrad
Yes pushing newRadio will push a copy of the Radio object into the vector. You also don't need to free the vector because it is local only so it will be destroyed once you are out of its scope. If for instance you wrote
vector *m_radios = new vector();
Then you would have to free that memory by calling the vector destructor manually.