How to delete allocated memory

Hi. Respect to the example. Could you please tell me the right way to delete all the memory allocated from this piece of code.

i believe that i have to do something like this.

vector<SomeClas s *> someVector;

for (int i=0; i<args.size(); i++){
SomeClass* temp= new SomeClass(args[i]);
someVector.push _back(temp);

...