@BrentC: It seems to solve the problem, as memory usage is now correct, and any size directory now parses
Your code looks correct for what you were trying to do. I'm actually really surprised this worked, but I guess there's more autorelease going on in -isValid than I would have guessed. In any case, you could probably just comment out the -isValid check without any real risk.
The real solution is for the application to change to be smarter about doing the images in batches. Ideally, it probably wouldn't even load actual image data until you started to scroll to the places where you might need it. But it wasn't really designed for scalability -- just a simple demo.
The new ImageKit framework in Leopard makes a lot of this vastly simpler.
by Scott Stevenson — Nov 07
Your code looks correct for what you were trying to do. I'm actually really surprised this worked, but I guess there's more autorelease going on in -isValid than I would have guessed. In any case, you could probably just comment out the -isValid check without any real risk.
The real solution is for the application to change to be smarter about doing the images in batches. Ideally, it probably wouldn't even load actual image data until you started to scroll to the places where you might need it. But it wasn't really designed for scalability -- just a simple demo.
The new ImageKit framework in Leopard makes a lot of this vastly simpler.