I should note that, while we saw something like 0.4% increased crash rate, we actually don't have a number to compare it against for memory crashes.<p>This is because if memory usage gets too high, the OS will send a kill signal to the process, which can be neither detected nor caught.<p>This means that in our original decision to use this fix, all we had was anecdotal evidence of untraceable crashes. Luckily we had dedicated QA that was keeping pretty solid track of them all, and they piled up.<p>In our case I think it was worth it.
Our app uses this method to cache images and we were seeing <i>huge</i> memory leaks due to this bug. Like the example showed, the bug manifested itself in a retain count being incremented on property access. Our solution was something like this:<p><pre><code> if ([self.data retainCount] != [self.data retainCount]) {
[[[self.data release] release] release];
}
</code></pre>
Written from memory, so excuse any mistakes. First (and only) time I've ever seen a legitimate use for `retainCount`. @bbum would be proud (or perhaps horrified).
The link to garbage collection is a bit odd. The garbage collector does not, of course, exist on iOS, and this bug has nothing to do with garbage collection. It's just a memory leak due to bad manual memory management. It <i>just so happens</i> that this leak is in code that's written to also work when garbage collection is on, but the leak isn't due to, or even related to, garbage collection.<p>This may be nitpicking, but it made it hard for me to pay attention to the real meat of the thing.
Aren't you living dangerously by still using garbage collection on iOS at this point? Apple keep making dire statements about how everyone needs to stop using it, so I'd be worried that iOS8 will just remove it entirely, meaning apps that use GC just wouldn't work at all on that OS...
What I love about these stories from the trenches isn't just seeing how the mystery gets solved (although that part is great), but seeing the evolution of the investigation -- which might be the more valuable of the two things when it comes to improving your own bug tracking skills.