NSArray 및 NSMutableArray를 릴리스하지만 표시 메모리 누수가 있습니다. ZoneData 코드이아이폰 : 어떻게 NSArray 메모리 누출을 해결하기 위해?
-(ZoneData*) initWithZoneName:(NSString *)zoneNameIn SdName:(NSString *)sdNameIn eCount:(NSString *)eCountIn iCount:(NSString *)iCountIn StandLat:(NSString *)standLatIn StandLong:(NSString *)standLongIn
{
self = [super init];
if (self)
{
zoneName = [zoneNameIn copy];
lsdName = [sdNameIn copy];
leCount = [eCountIn intValue];
liCount = [iCountIn intValue];
standLat = [standLatIn copy];
standLong = [standLongIn copy];
}
return self;
}
같이있는 동안 어떻게이 문제를 해결하려면?
그리고 당신은 해제해야합니다 * 영역 이름 *, * lsdName *, * standLat * * standData * ZoneData *의 dealloc * 메소드에서 * long *. – EmptyStack
forloop의 모든 반복에서 ZoneData * 데이터를 할당하는 이유는 무엇입니까? 동시에 전에도 할 수 있습니다. –