0
這裏內部重分配的NSMutableArray的是我的代碼:一個功能
- (void)showRectangles
{
NSMutableArray *rects = [[NSMutableArray alloc]init];
//....rest of code here
[rects release];
}
這裏的問題是,當我對代碼進行分析,它給了我這樣的警告:
Incorrect decrement of the reference count of an object that is not owned at this point by the caller
我不不明白爲什麼這給我一個警告。誰能解釋爲什麼?
「剩餘代碼」中的某些內容已重新分配或已釋放「rects」;這兩條線本身是完全正確的。 – 2012-07-23 06:04:17