Processing several pictures from camera dealing with heap memory
I want to process several pictures from the camera and compute some operations on each. Currently I'm scaling down every image in the cameras JPEG callback to hold each in the heap memory at runtime, but since this doesn't scale that good (apparently) I'm in need of a proper solution. Also the image operations need to be fast and I want to 开发者_StackOverflow中文版avoid writing each image onto SD as long as possible. After doing my operations I don't need the images anymore.
I was thinking of referencing every image in a list of SoftReferenes, but since I won't be notified before the GC is deleting a reference (so that I could save this particular image on to SD) this doesn't seem to be an option.
Any hints or tips are welcome.
精彩评论