메소드내 선언된 변수를 반복문에서 다시 선언 할 경우 메모리릭이 발생할 수 있음
NSMutableArray *array = [NSMutableArray array];
...
...
for(int i = 0; i < spotInfo.i_commentArray.count; i++)
{
...
...
for(int i = 0; i < spotInfo.i_commentArray.count; i++)
{
NSMutableArray *array = [NSMutableArray array]; // <-- 메모리릭 발생가능
...
...
}
'iOS' 카테고리의 다른 글
CFURLCreateStringByAddingPercentEscapes 메모리 관리 (0) | 2011.02.17 |
---|---|
오퍼레이션 큐에서 메모리릭 상황 (0) | 2011.02.17 |
Custom UINavigationController (0) | 2011.01.24 |
iPhone TestCase 생성 (0) | 2011.01.18 |
NSOperation (0) | 2011.01.11 |