ios - Finding the cause of memory leak in Instruments -



ios - Finding the cause of memory leak in Instruments -

i have run leaks in instruments , showing me memory leak 100% value. able see line of code causing problem. not sure error is..

- (void) listallbooks { if (marrlistfromdb != nil) { [marrlistfromdb removeallobjects]; marrlistfromdb = nil; } marrlistfromdb = [[nsmutablearray alloc] init]; servercommunicationapi *servapi = [[servercommunicationapi alloc] init]; servapi.delegate = self; nsurl *url = [nsurl urlwithstring:klistcontents]; [servapi listbookswithdeviceid:singleton.g_strdevid devicekey:singleton.g_strdevid andsessionstring:singleton.g_strsessionid sessionkey:@"sessionkey" url:url andrequestmethod:@"post"]; }

the line of error lastly one. not sure why causing memory leak... need guidance..

it hard tell info provided, maybe delegate property of servercommunicationapi declared (strong)? in case servapi never released, because keeps strong reference (retain cycle). suggest check in instruments kind of object leaks, create reply much easier.

ios memory-leaks xcode-instruments

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -