iphone - My Application Crashing when using url connnections -
i working on sever based project in if push 3 view controllers 1 one .. each view requesting urls , getting data sever in scenario working fine when pop (or) coming previous view click in button continuously app crashing because data server not received , again requesting url
- (void)connectiondidfinishloading:(nsurlconnection *)connection { [uiapplication sharedapplication].networkactivityindicatorvisible = no; [self hideloader]; if (_delegate != nil) { nsmutabledata *data = [[nsmutabledata alloc]initwithdata:responsedata]; [_delegate finishedreceivingdata:data withrequestmessage:requestmessage]; [data release]; } -- getting error here..
and want crash report application there frameworks?
in dealloc method of controller/view (depends delegate) need nil delegate property.
- (void)dealloc { _urlconnection.delegate = nil; [super dealloc]; }
don't count on nil condition. can deallocated, not nil.