A very basic question, when I have something like:
TTStyledText * text = [TTStyledText textFromXHTML:message.message lineBreaks:YES URLs:NO];
text.width = self.frame.size.width - 60;
text.font = [UIFont fontWithName:@"ArialMT" size:17.0];
_main_title.text = text;
When I assign text to _main_title.text, does it mean that _main_title.text retains text?
Actually, it means that you shouldn’t care if
_main_title.textretainstextor not.That would be entirely an implementation detail of the setter method. It might copy the text. It might do something whacky internally. You shouldn’t need to know.
You should only need to worry about the memory management in your code and, in that code, your memory management is correct.
Finally, if you want
textto survive beyond the end of that particular scope, then you should retain it (and release it later).