I wouldn't expect Instruments to identify the leak until you released the objects from the array and you couldn't access them any further. If you add a "purge memory" button where you [array removeAllObjects], I'd be you'd get a leak appearing.
Aren't those objects going to be autoreleased because you used a convenience method: initWithContentsOfFile: ?
They will get autoreleased when the method exits. But, I dont know why the image wasn't displayed. Adding them to the array should have triggered a retain on them and therefore should work.
Thanks for the video, I'm interested to know what's really going on in this situation and especially why the image wasn't displayed.
I wouldn't expect Instruments to identify the leak until you released the objects from the array and you couldn't access them any further. If you add a "purge memory" button where you [array removeAllObjects], I'd be you'd get a leak appearing.
jgwacker 7 months ago
I just realized you used "alloc" so you must own them, then adding them to the array should cause their release counts to be 2. Right?
xvindix 7 months ago
Aren't those objects going to be autoreleased because you used a convenience method: initWithContentsOfFile: ?
They will get autoreleased when the method exits. But, I dont know why the image wasn't displayed. Adding them to the array should have triggered a retain on them and therefore should work.
Thanks for the video, I'm interested to know what's really going on in this situation and especially why the image wasn't displayed.
xvindix 7 months ago