I have one more hypothetical question.
I create function:
-(IBAction)text:(id)sender{
UITextView * textview = [[UITextView alloc]initWithFrame:CGRectZero];
}
and because I use ARC I expected that object would be released when function goes out of scope .
But with Instrument I detected that memory is not freed.
Have anyone idea why?
ARC will autorelease/release the textView wether it is nil or not
wrap it all in a @autoreleasepool to do so!
As for the initial grow when the textview is used the first time: the cocoa touch text system is allocated. (The underlying ‘engine’ that all textviews share)