The code "VarPtr a" does not return the address of the object a, it returns the address of the reference to the new T object (which is what 'a' is, just a reference).
Therefore when you reassign the reference 'a' using the second 'a=New T', p1[0] will access the new object.
Therefore when you reassign the reference 'a' using the second 'a=New T', p1[0] will access the new object.