<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,9 +21,7 @@
 		return;
 	}
 	
-	NSString *resultString = [[NSString alloc] initWithFormat:
-							  @&quot;'%@' has %d characters.&quot;,target,len];
-	[countLabel setStringValue:resultString];
+	[countLabel setStringValue:[NSString stringWithFormat:@&quot;'%@' has %d characters.&quot;,target,len]];
 }
 
 @end</diff>
      <filename>CharacterCounter/AppController.m</filename>
    </modified>
    <modified>
      <diff>@@ -21,14 +21,23 @@
 		return nil;
 	
 	NSAssert(theDate != nil, @&quot;Argument must be non-nil&quot;);
-	entryDate = theDate;
+	entryDate = [theDate retain];
 	firstNumber = random() % 100 + 1;
 	secondNumber = random() % 100 + 1;
 	return self;
 }
 
+- (void) dealloc
+{
+	NSLog(@&quot;deallocing %@&quot;, self);
+	[entryDate release];
+	[super dealloc];
+}
+
 - (void) setEntryDate:(NSCalendarDate *) date
 {
+	[date retain];
+	[entryDate release];
 	entryDate = date;
 }
 
@@ -49,11 +58,8 @@
 
 - (NSString *) description
 {
-	NSString *result;
-	result = [[NSString alloc] initWithFormat:@&quot;%@ = %d and %d&quot;, 
-			  [entryDate descriptionWithCalendarFormat:@&quot;%b %d %Y&quot;], 
-			  firstNumber, secondNumber];
-	return result;
+	return [NSString stringWithFormat:@&quot;%@ = %d and %d&quot;,
+			[self entryDate], [self firstNumber], [self secondNumber]];
 }
 
 @end</diff>
      <filename>lottery/LotteryEntry.m</filename>
    </modified>
    <modified>
      <diff>@@ -28,13 +28,21 @@ int main (int argc, const char * argv[]) {
 		
 		// Add the LotteryEntry object to the array
 		[array addObject:newEntry];
+		
+		[newEntry release];
 	}
 	
+	[now release];
+	now = nil;
+	
 	for (LotteryEntry *entryToPrint in array) {
 		// Display its contents
 		NSLog(@&quot;%@&quot;, entryToPrint);
 	}
 	
+	[array release];
+	array = nil;
+	
 	[pool drain];
     return 0;
 }</diff>
      <filename>lottery/lottery.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dcc053dcb6f40c9ccfab59e6663c06f32ad3c59d</id>
    </parent>
  </parents>
  <author>
    <name>jake</name>
    <email>jake@dropio.com</email>
  </author>
  <url>http://github.com/whoisjake/cocoa_adventures/commit/8ed8dbcba8f71d9c26d0ac1cf1bffaaf32cd90ee</url>
  <id>8ed8dbcba8f71d9c26d0ac1cf1bffaaf32cd90ee</id>
  <committed-date>2008-08-12T12:35:58-07:00</committed-date>
  <authored-date>2008-08-12T12:35:58-07:00</authored-date>
  <message>Fixed memory leaks</message>
  <tree>14104d1ace64d72172672fb11d0b08363324f416</tree>
  <committer>
    <name>jake</name>
    <email>jake@dropio.com</email>
  </committer>
</commit>
