Reputation: 18132
I ran Instruments on my iPad app to check for leaks. It found several "leaks" where an object was being retained in a method:
alt text http://cl.ly/a85d3d8bdc6286c8de71/content
But these objects are released later in dealloc:
alt text http://cl.ly/a265f76a538ee55781df/content
Are these classified as false-positives?
Upvotes: 1
Views: 643
Reputation: 5732
Is self.detailPopover a property declared with retain? If so then the assignment self.detailPopover will result in the generated set method calling retain on the object returned from alloc that you already own.
If it is a retained property then remove self from the assignment so the set method is not called and your retain count will be correct.
Property* prop = [[Property alloc] init]; // retain count == 1
self.property = prop; // retain count == 2
[prop release]; // retain count == 1
or avoid the generated set method and it's retain...
property = [[Property alloc] init]; // retain count == 1
Upvotes: 3