我的项目中有以下代码:
RBPPStockChartViewController * stocksController = [[RBPPStockChartViewController alloc] initWithNibName:@"RBPPStockChartViewController" bundle:nil];
stocksController.companyCode1 = selectedCompany.companycode;
stocksController.ticker1Text = selectedCompany.ticker;
stocksController.isMarketIndicator = FALSE;
if (isfromTVIndexes)
{
stocksController.isDJIndexesMenuDisplay = TRUE;
stocksController.isDJIndexesDirectChartDisplay = FALSE;
}
stocksController.closechartdelegate = self;
self.stockchartvc = stocksController;
[[self view] addSubview:stocksController.view];// here retain count is incremented.
// And I am getting leak when I check
//with instrument.
我正在使用 ARC。我想知道如何克服这种泄漏。