by jkubicek · 13y ago · 0 comments
if ([self.data retainCount] != [self.data retainCount]) {
[[[self.data release] release] release];
}
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).That's super weird - I have yet to encounter something along these lines in my Cocoa work so far. Solid idea to beat the system there. I just hope it's got a nice comment above it haha.
I would imagine this is what leads to the 0.4% crash rate I mentioned at the top of the article :-(