Permalink
Browse files

Fixed 3 memory leaks.

  • Loading branch information...
1 parent 31cc1e9 commit 95d5fefc93091cd97a97c291ea0bc10a319715b7 @snej snej committed Sep 13, 2011
Showing with 5 additions and 4 deletions.
  1. +1 −1 Couch/CouchPersistentReplication.m
  2. +1 −1 Model/CouchModel.m
  3. +3 −2 UI/iOS/CouchUITableSource.m
@@ -38,7 +38,7 @@ + (CouchPersistentReplication*) createWithReplicatorDatabase: (CouchDatabase*)re
rep.autosaves = YES;
[rep setValue: source ofProperty: @"source"];
[rep setValue: target ofProperty: @"target"];
- return rep;
+ return [rep autorelease];
}
View
@@ -234,7 +234,7 @@ - (NSDictionary*) propertiesToSave {
id value = [_properties objectForKey: key];
[properties setValue: [self externalizePropertyValue: value] forKey: key];
}
- return properties;
+ return [properties autorelease];
}
@@ -150,8 +150,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView
{
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier: @"CouchUITableDelegate"];
if (!cell)
- cell = [[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault
- reuseIdentifier: @"CouchUITableDelegate"];
+ cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault
+ reuseIdentifier: @"CouchUITableDelegate"]
+ autorelease];
CouchQueryRow* row = [self rowAtIndex: indexPath.row];
cell.textLabel.text = [self labelForRow: row];

0 comments on commit 95d5fef

Please sign in to comment.