我刚刚发现了XCode的Build> Analyze功能,所以我正在尝试着解决它所发现的所有错误。有几行XCode中发现的异常与被困惑我:XCode - 使用Build> Analyze,潜在的泄漏警告
//Test View
self.imageViewTest = [[UIImageView alloc] init];
self.imageViewTest.frame = CGRectMake(0, 0, 100, 100); // <=== Leak
[self.view addSubview:self.imageViewTest];
//Test View 2
self.imageViewTestB = [[UIImageView alloc] init];
self.imageViewTestB.frame = CGRectMake(0, 100, 100, 100); // <=== Leak
[self.view addSubview:self.imageViewTestB];
在我的视频拍摄设置
后来
self.captureOutput = [[AVCaptureVideoDataOutput alloc] init];
captureOutput.alwaysDiscardsLateVideoFrames = YES; // <=== Leak
在这些线路的警告“对象的潜在泄漏”。在我的dealloc
方法中,所有这3个对象都发送release
消息。这里有什么可能是错的?
谢谢!
这些属性是如何声明的(保留,分配,复制等)? –
他们都被宣布为保留。 –