I've been taking heapshots of a certain process. All the leaked objects in all the shots originate in this method:
- (void)setArticle:(Article *)article
{
if (_article != article)
{
[self.navigationController popToViewController:self animated:YES];
[_article removeObserver:self forKeyPath:kArticleObservationKey];
[_article release];
_article = [article retain];
[_article addObserver:self forKeyPath:kArticleObservationKey options:NSKeyValueObservingOptionNew context:&__ArticleObservingContext];
[_article loadIfNeededWithPriority:OGRequestPriorityHigh downloadAllImage:NO];
[_article fetchRelatedStories];
}
[self resetArticleView]; // 65% of heapshot allocations
if ([_article.isStub boolValue])
{
[self.view showSpinner];
}
if (_article)
{
[Analytics articleReadWithParmeters:[NSDictionary dictionaryWithObject:_article.idOnServer forKey:AnalyticsKeyArticleId]]; // 32% of heapshot allocations
}
}
Here is the actual heapshot, they all look identical to this:
I've got few questions:
- What are my next steps? I don't see any leaks in this method, why is it featured so prominently in the heapshots?
- The
[self resetArticleView]
has a little 65% next to it, but that particular method shows up in none of the stack traces for my leaked objects. Am I misunderstanding what that particular 65% designation means? If it does mean that it contains 65% of the leaked allocations, why is that method not in any stack traces?