Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix memory leak in MMGridViewDefaultCell #10

Merged
merged 1 commit into from about 3 years ago

2 participants

Francis Chong
Francis Chong

as title

provideal merged commit 4aeb3f2 into from
provideal closed this
Owner

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 12, 2011
Francis Chong siuying fix memory leak dfd7e39
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 MMGridView/MMGridViewDefaultCell.m
6 MMGridView/MMGridViewDefaultCell.m
@@ -41,15 +41,15 @@ - (id)initWithFrame:(CGRect)frame
41 41 {
42 42 if ((self = [super initWithFrame:frame])) {
43 43 // Background view
44   - self.backgroundView = [[UIView alloc] initWithFrame:CGRectNull];
  44 + self.backgroundView = [[[UIView alloc] initWithFrame:CGRectNull] autorelease];
45 45 self.backgroundView.backgroundColor = [UIColor lightGrayColor];
46 46 [self addSubview:self.backgroundView];
47 47
48 48 // Label
49   - self.textLabelBackgroundView = [[UIView alloc] initWithFrame:CGRectNull];
  49 + self.textLabelBackgroundView = [[[UIView alloc] initWithFrame:CGRectNull] autorelease];
50 50 self.textLabelBackgroundView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7];
51 51
52   - self.textLabel = [[UILabel alloc] initWithFrame:CGRectNull];
  52 + self.textLabel = [[[UILabel alloc] initWithFrame:CGRectNull] autorelease];
53 53 self.textLabel.textAlignment = UITextAlignmentRight;
54 54 self.textLabel.backgroundColor = [UIColor clearColor];
55 55 self.textLabel.textColor = [UIColor whiteColor];

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.