project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
changeset 3971 5c82ee165ed5
parent 3917 4c243b1eac97
child 3983 aa24192417a8
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Mon Oct 11 16:56:00 2010 -0400
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Tue Oct 12 05:06:30 2010 +0200
@@ -51,7 +51,7 @@
 
     NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
     // avoid overwriting selected teams when returning on this view
-    if ([cachedContentsOfDir isEqualToArray:contentsOfDir] == NO) {
+    if ([self.cachedContentsOfDir isEqualToArray:contentsOfDir] == NO) {
         NSArray *colors = getAvailableColors();
         NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[contentsOfDir count]];
         for (int i = 0; i < [contentsOfDir count]; i++) {
@@ -215,10 +215,10 @@
 #pragma mark -
 #pragma mark Memory management
 -(void) didReceiveMemoryWarning {
-    // Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
     // Relinquish ownership any cached data, images, etc that aren't in use.
     self.cachedContentsOfDir = nil;
+    MSG_MEMCLEAN();
+    [super didReceiveMemoryWarning];
 }
 
 -(void) viewDidUnload {