I think i have an UIImage that has a higher retain count than it should have and i am probably leaking memory. I use this image as a thumbnail, to set a custom background to a uibutton. So the uibutton is holding a reference to it and so do i. But instead of 2, the retainCount is 3. Do i have to create a custom UIImage derived class and override dealloc if I want to place a log message there and then change the class used from UIImage to my class, or is there an easier way. Thanks in advance.
Share
Use a category on the targeted class to override dealloc and set a breakpoint on it.
http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCategories.html