Pushing a new AKOMultiPageTextView, e.g.
PushedViewController *newController=[[PushedViewController alloc] initWithNibName:@"PushedViewController" bundle:nil];
[self presentModalViewController:newController animated:NO];
where pushedViewController
has an AKOMultiPageTextView object and nothing else causes a leak. When this is done again, the leak is repeated. The leak is less noticeable with small strings, but we've been working with 4,000 word+ strings which cause 7-10 MB leaks per push (quickly causes app failure).
Call stack for the allocation is:
1 CoreText -[_CTNativeGlyphStorage prepareWithCapacity:preallocated:]
2 CoreText -[_CTNativeGlyphStorage initWithCount:]
3 CoreText +[_CTNativeGlyphStorage newWithCount:]
4 CoreText TTypesetterAttrString::Initialize(__CFAttributedString const*)
5 CoreText TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*)
6 CoreText TFramesetterAttrString::TFramesetterAttrString(__CFAttributedString const*)
7 CoreText CTFramesetterCreateWithAttributedString
Memory is being allocated in at line 374 in AKOMultiColumnTextView.m:
CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef)self.attributedString);
We've modified your sample project to show the same behavior, so it's not something in our own project (we can provide this adjusted project on request). Any ideas what might be causing this?