I get EXC_BAD_ACCESS on some devices in ad hoc beta for my application, see here:
iPhone application debugging help - EXC_BAD_ACCESS
I managed to use atos -arch armv6 -o myapp.app/myapp 0x000037a6 in the terminal to track the method that causes this problem, and this led me to this part of the code:
for (UIView *view in scrollView.subviews) {
[view removeFromSuperview];
}
I suspect the application receives a memory access warning and releases scrollview or UIImageViews that are children, so when I use this method above, it encounters an error (and crash) as it overrides the view.
My question is, how can I make it safe so that it is released only if it has not yet been released?
source
share