You are creating new tensors in:
item = item.contiguous()

and replace them directly in each iteration, which could (and in your case will) reuse the data_ptr.
If you print item.data_ptr() of x and y or item before the contiguous() call you would see that they are different.