나는 여전히 iphone 메모리 관리에 관한 나의 머리를 감싸고있다. 나는 이것을 누출과 함께 점검했지만 확실하게하고 싶다. 이것은 누수가 없습니까?iphone 메모리 관리 및 배열
NSMutableArray *array = [[NSMUtableArray alloc] init];
NSMutableString *str = [[NSMutableString alloc]];
[str appendstring:@"hi"];
[array addObject:str];
[str release]; //this is the bit I am most concerned about
...some processing of array occurs...
[array release];
누수가 없어야 수 있지만, '아무튼 t 컴파일. :) –
2 행에'init'이 누락 되었습니까? 어쨌든 누출이없는 것 같습니다. – Ryan
이 주제에 관한 나의 저서는 무료 온라인 : http://www.apeth.com/iOSBook/ch12.html#_memory_management (ARC를 고려하여 재 작성 됨) – matt