Memory Continues to Increase when Loading and Releasing NSImage
问题 I have a problem where my application aggressively consumes memory to a "thrashing point" with successive image file loads. For example, consider the following code, which repeatedly loads and releases a 15MB JPEG file (large file size for test purposes): NSURL *inputUrl = [NSURL URLWithString:@"file:///Users/me/Desktop/15MBjpeg.jpg"]; for(int i=0; i<1000; i++) { NSImage *image = [[NSImage alloc] initWithContentsOfURL:inputUrl]; [image release]; } It performs quickly for the first several