I'm observing the Pasteboard for changes, that include images. The amount of memory I can use is limited, so most images make the program result in a jetsam crash due to their size. Is it possible to store them more efficiently?
Currently I'm using this code to store them:
for (UIImage* image in [_pasteboard images]) {
[UIImagePNGRepresentation(image) writeToFile:path atomically:YES];
}
I solved it by making a different process with more memory do the work. The original process only sends a notification now.