The pointer is supposed to change. NSString is not a mutable object.
Also NSString is magic. It looks like a real object but at the heart
is not a real object. So in this case your going to change the pointer
each time. If you want a new object each time you want to use the copy
method:
ip_comun = [port.text copy];
port_comun = [port.text copy];
This will create two new object with the same internal value but will
not point to the same NSString as before. This is what is recommended
for NSString. Also it is the usual default with instance variables.
This difference is also why it is recommended to use the self.
notation to keeps things in order.
@property (nonatomic, copy) NSString *myString;
self.myString = herString;
is the same as
myString = [herString copy];
Hope it helps.