It isn't better. v.clear() would simply do what it says: destroy all the elements of v (in linear time) vector<int>().swap(v); does the same in a more obfuscated way: swap the buffers of the temporary vector and the old vector (constant time), destruct the temporary vector (linear time)
Using swap may add some minor overhead caused by the construction and destruction of the temporary vector.