关于使用泄漏仪器和修理的问题

时间:2012-02-17 23:53:37

标签: objective-c ios cocoa-touch memory-leaks

我有这段代码:

TImageView *thumbnailView  = [[TImageView alloc] initWithFrame:self.frame];
   thumbnailView.delegate = self;
    thumbnailView.hidden = NO;
    thumbnailView.contentMode = UIViewContentModeScaleAspectFill;
    thumbnailView.clipsToBounds = YES;
    thumbnailView.urlPath = URLPath;

    [self addSubview:thumbnailView];

    [thumbnailView release];

where, TImageView is a custom class

现在,当使用泄漏仪器时,如果我点击扩展细节,一次泄漏,

我看到99.6%的内存泄漏是由于这一行:

    thumbnailView.urlPath = URLPath;

我不知道。有什么帮助吗?

1 个答案:

答案 0 :(得分:0)

有两个可能的原因:

  1. 您没有发布urlPath属性(请参阅this question
  2. 您没有发布URLPath(请勿使用此类名称!)