I have a few different view controllers that use the method below to grab a logo image from the Kinvey File Store and display it in an imageView. I was noticing that after I implemented these calls, my apps memory usage was growing with every load of a view controller that used it. After some aggressive NSLogging, it looks like that if I use this method in a view controller, it doesn't get deallocated when it should. If I comment out this method, it deallocates normally. Any thoughts on why this is? I am using this in a few different VCs and the behavior is always the same. No call = normal deallocation. Call = retain cycle?
Turns out this is caused by something I didn't include in my code above. I was using the returned image to set the image property on an imageView. It appears that my use of the self.imageView.image= was causing the retain cycle. Specicfically, the use of the "self" cell. In case anyone has this issue in the future, I used the following code to get access to the self,imageView property without causing a retain cycle.