referred as :
http://stackoverflow.com/questions/4521065/memory-leak-in-uiimagepicker-in-iphone UIImagePickerviewController에는 알려진 leakage가 있는데,
애플은 애플리케이션 life-cycle 동안 한번의 allocation과 instantiation을 권장한다.
고로, 어플리케이션이 러닝되는 동안에는 새로운 인스턴스를 생성하지 말고 어플리케이션 초기화시 초기화하고
dealloc 시 release를 하면 메모리 누적으로 인한 crash를 막을 수 있다. Sample code :
in "mainviewcontroller.h"
...
@property ( nonatomic, retain ) UIImagePickerController *pickerInstance; in "mainviewcontroller.m"
@synthesize pickerInstance;
i.......
↧