我一直在拍摄某一过程的照片。所有镜头中的所有泄漏对象都源于以下方法:
- (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
}
}下面是实际的堆积图,它们看起来都与此相同:

我有几个问题:
[self resetArticleView]的旁边只有65%,但是这个特定的方法没有出现在我泄露的对象的堆栈跟踪中。我是否误解了65%的指定是什么意思?如果它确实意味着它包含了65%的泄漏分配,为什么该方法不存在于任何堆栈跟踪中?发布于 2011-07-26 14:48:05
打开“分配工具”中的“保留事件跟踪”,查看保留对象的内容.
你可能也会觉得这很有趣。什么时候泄密不是泄密?堆射分析
请注意,泄漏点和分配点可能不一样,这就是为什么在任何当前回溯跟踪中都不会显示的方法;该方法可能是分配的来源,但泄漏本身是由于其他地方的保留过多造成的。
(我不知道你指的是什么-有了截图吗?)
https://stackoverflow.com/questions/6819759
复制相似问题