1
내 응용 프로그램에서는 NSRunAlertPanel을 사용하여 사용자가 종료했음을 확인합니다.NSRunAlertPanel로 인해 메모리 누수가 발생합니다.
메모리 누수를 감지하기 위해 계기에서 응용 프로그램을 실행할 때 다음 코드에서 메모리 누수가 발생합니다.
-(void)CloseWithConfirm
{
int answer;
//Here, it is showing memory leak.
answer = NSRunAlertPanel (@"Quit Confirmation", @"Do you want to quit?", @"Yes", @"No", @"Cancel");
if(NSAlertDefaultReturn == answer)
[self close];
}
실마리가 있습니까?
사과가 [NSApp stopModal]을 사용하고 있지 않습니다. 거기에 샘플 프로젝트. –
답에 MySpecialPurpose를 주셔서 감사합니다. 이 메모리 누수가 이제 사라진 것 같습니다. – doptimusprime