I'm programming in objective-c and cocoa. The application does image processing and makes extensive use of OS utilities. When batch processing my application goes into a loop to process one image on each pass through the loop. On completion the program's dialog box is still visible so the user can process more images.
Under 10.5 resources are allocated and released for each pass in the loop.
Under 10.6 resources are allocated but the release does not occur until the function returns to the OS when all resources are released.
I've verified this is the case by placing a breakpoint at every function in the program and the Activity Monitor doesn't back off until this function returns to the OS.
When users batch process many large images the memory requirements can easily go into the gigabytes. My thinking at this time is to place the body of the loop into a function and send a message, via NSNotification, to trigger the function for each image. This is in hopes that the message will get queued along with resource management so that resources are properly released for each image.
Any thoughts?
Under 10.5 resources are allocated and released for each pass in the loop.
Under 10.6 resources are allocated but the release does not occur until the function returns to the OS when all resources are released.
I've verified this is the case by placing a breakpoint at every function in the program and the Activity Monitor doesn't back off until this function returns to the OS.
When users batch process many large images the memory requirements can easily go into the gigabytes. My thinking at this time is to place the body of the loop into a function and send a message, via NSNotification, to trigger the function for each image. This is in hopes that the message will get queued along with resource management so that resources are properly released for each image.
Any thoughts?