0

I have this piece of code :

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

Now, when using the leaks instrument, for one instance, one leak, if I click on the extended detail,

I see that 99.6% of memory leakage is because of this line:

    thumbnailView.urlPath = URLPath;

I have got no clue. Any help ?

Ahsan
  • 2,964
  • 11
  • 53
  • 96

1 Answers1

0

There are two possible reasons:

  1. You're not releasing urlPath attribute (see this question)
  2. You're not releasing URLPath (don't use such names!)
Community
  • 1
  • 1
Max
  • 16,679
  • 4
  • 44
  • 57
  • 2. URLPath is something I get from the method argument. (I did not write this custom class....) – Ahsan Feb 18 '12 at 03:44