--- a/cocoaTouch/HogHatViewController.m Mon Apr 12 21:51:09 2010 +0000
+++ b/cocoaTouch/HogHatViewController.m Tue Apr 13 14:39:05 2010 +0000
@@ -28,7 +28,8 @@
NSString *hatsDirectory = HATS_DIRECTORY();
NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:hatsDirectory error:NULL];
self.hatArray = array;
-
+ [array release];
+
// load all the hat images from the previous array but save only the first sprite and store it in hatSprites
NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[hatArray count]];
for (int i=0; i < [hatArray count]; i++) {
@@ -161,6 +162,7 @@
if (newRow != oldRow) {
// if the two selected rows differ update data on the hog dictionary and reload table content
+ // TODO: maybe this section could be cleaned up
NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog];