project_files/HedgewarsMobile/Classes/EditableCellView.m
changeset 3667 9359a70df013
parent 3662 a44406f4369b
child 3697 d5b30d6373fc
--- a/project_files/HedgewarsMobile/Classes/EditableCellView.m	Fri Jul 23 22:14:56 2010 +0400
+++ b/project_files/HedgewarsMobile/Classes/EditableCellView.m	Sat Jul 24 23:23:10 2010 +0200
@@ -27,14 +27,14 @@
         [textField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
         
         [self.contentView addSubview:textField];
-        [textField release];
+        //[textField release];
         
         titleLabel = [[UILabel alloc] init];
         titleLabel.textAlignment = UITextAlignmentLeft;
         titleLabel.backgroundColor = [UIColor clearColor];
         titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
         [self.contentView addSubview:titleLabel];
-        [titleLabel release];
+        //[titleLabel release];
         
         minimumCharacters = 1;
         maximumCharacters = 64;
@@ -71,9 +71,10 @@
 }
 
 -(void) dealloc {
-    [oldValue release], oldValue = nil;
-    [titleLabel release], titleLabel = nil;
-    [textField release], textField = nil;
+    self.delegate = nil;
+    releaseAndNil(oldValue);
+    releaseAndNil(titleLabel);
+    releaseAndNil(textField);
     [super dealloc];
 }