-(id)setBigObject:(BigObject *)abc{
self.wl = abc;
abc.smallObject = self.smallObject;
}
I have a abc, which is a big Object, when the user pass the bigObject, abc. I assign to my wl value, so , I write “self.wl = abc;”, but I want my smallObject assign to the abc’s smallObject, so, I do “abc.smallObject = self.smallObject; “
So, when I edit the smallObject in self, it will also changed in the abc’s also? Am I right?
Yes, if you have multiple pointers to the same object then a change to that object through any of those pointers is modifying the same object (If I understand your question correctly).
When you assign pointers like that you should also send the object a retain message (and release it when you’re done with it), unless you are using garbage collection.