I’m pretty new at Obj-C/Cocoa so hopefully I’m not asking something too obvious, but I seem to be having some pretty big memory leaks and I’m not quite sure the best way to track it down.
Basically, I have a NSTimer-called method where I’m loading up a new image and displaying it in a CALayer (setting CALayer.contents). I have a NSAutoreleasePool subpool set up for the method (since NSTimer’d calls get launched in a separate thread? and I’m releasing all the various CGImage bits that I’m explicitly calling, including the CGImageRef after I set it to CALayer.contents. Do I need to also call a release on CALayer.contents when I’m switching the layer contents?