问题
Below is my code:
NSOpenPanel *openDlg = [NSOpenPanel openPanel];
[openDlg setCanChooseFiles:YES];
[openDlg setAllowedFileTypes:[NSArray arrayWithObjects:@"pdf", nil]];
if([openDlg runModal] == NSOKButton) {
...
}
Before I call runModal
the memory used was 30MB, but after calling it, the memory used seemed to be 70MB, and when I scroll up and down, the used memory is increasing.
Can anyone tell me the reason? Is it kind of memory leak?
来源:https://stackoverflow.com/questions/16009317/nsopenpanel-related-memory-questions