Solved by JuanFMontesinos in post #4 
              
              
                Well it is. 
That you overwrite the doesn’t mean that the object disappears. 
The object is still there while it’s required. 
The corresponding memory will be freed once it’s no longer pointed by an alive variable in the environment. 
import ctypes
a = "hello world"
a_id = id(a)
a=141
print( ctypes.…