ios - Under ARC, keep getting EXC_BAD_ACCESS after using ARC, beacause of using Block? -
PROBLEM: I'm getting EXC_BAD_ACCESS. And after I open NSZombieEnabled, I see this [FeatureCommentListViewController respondsToSelector:]: Sent the message sent to the deallocated example 0x7c1dc30
-
Before I changed my project to ARC, such a There is an error, but after that I changed to ARC, this error appeared.
-
I declare a ViewController in a block and push it into the Navigation Controller. Will this matter in case the life is short
UIBlockButton
is fromUIBlockButton * lbGood3 = [[UIBlockButton alloc] initWithFrame: CGRectMake (0, 0, First_Button_Width, [self GetGoodRow2Height: Vastu's finer]]]; [LbGood3 handleControlEvent: UIControlEventTouchUpInside withBlock: ^ {NSLog (@ "% @", Label.text); ProductDetail * productDetail = [productDetailDict objectForKey: @ "product"]; NSString * dp_id = [NSString stringWithFormat: @ "% @ -% @", productDetail.url_crc, productDetail.site_id]; FeatureCommentListViewController * cmtListController = [[FeatureCommentListViewController alloc] initWithNibName: @ "FeatureCommentListViewController" bundle: zero]; CmtListController.title = Label.text; CmtListController.isReviewed = isReviewed; CmtListController.productDetail = productDetail; CmtListController.dp_id = dp_id; CmtListController.feature_name = @ "& amp; feature_good_id = 2"; [Self. Navigation controller Push ViewController: animated CMTLICs controller: Yes]; }];
Should I declare the controller as a member of this view controller or just declare it out of the block?
I have resolved this in ViewDidLoad function to viewCidListViewController and used it in block.
Comments
Post a Comment