prova così
codice:
  while (vettore.size>0)
  {
    delete vettore.back ( );
    vettore.pop_back();
  }