project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
changeset 4920 bc3c077e15a2
parent 4811 3edc0cdcfe03
child 4976 088d40d8aba2
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Sat Feb 05 11:32:15 2011 +0300
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Sat Feb 05 15:45:44 2011 +0100
@@ -77,7 +77,9 @@
         selectedTeamsCount = [self.listOfSelectedTeams count];
         allTeamsCount = [self.listOfTeams count];
 
-        self.cachedContentsOfDir = [[NSArray alloc] initWithArray:contentsOfDir copyItems:YES];
+        NSArray *contents = [[NSArray alloc] initWithArray:contentsOfDir copyItems:YES];
+        self.cachedContentsOfDir = contents;
+        [contents release];
     }
     [self.tableView reloadData];
 }