This question has nothing to do with garbage collection, it relates purely to parameter passing.
As s is passed by value, outside the function the reference to v still exists. As a result v will not be garbage collected at this point, but rather vh will be eligible for GC after the function terminates.