泄漏似乎是由无人管理引起的,但我没有将textview注册到任何无管理者。
顺便说一下,我使用ARC,第二个视图控制器的textView属性为:@property (nonatomic,strong) UITextView *descriptionTextView;
textView在viewDidLoad中初始化为:
self.descriptionTextView = [[UITextView alloc]initWithFrame:CGRectMake(5, self.titleTextField.frame.origin.y + self.titleTextField.bounds.size.height + 10, 310, self.view.bounds.size.height - 214 - 40 - 10 - 14 - self.titleTextField.frame.origin.y - self.titleTextField.bounds.size.height)];
self.descriptionTextView.layer.cornerRadius = 0;
self.descriptionTextView.editable = YES;
self.descriptionTextView.userInteractionEnabled = YES;
self.descriptionTextView.layer.borderColor = [kColor_MainColor CGColor];
self.descriptionTextView.font = [UIFont fontWithName:@"ArialMT" size:18.0f];
self.descriptionTextView.contentInset = UIEdgeInsetsZero;
self.descriptionTextView.scrollEnabled = YES;
self.descriptionTextView.textColor = [UIColor colorWithRed:80/255.0 green:80/255.0 blue:80/255.0 alpha:1.0];
self.descriptionTextView.backgroundColor = [UIColor whiteColor];
self.descriptionTextView.delegate = self;