objective c - Object changes from NSMutableArray to NSData to NSString -


i have program works normally. downloaded code http://github.com/matej/mbprogresshud show progress meter when doing something.

this code makes progress meter pop up.

[hud showwhileexecuting:@selector(mytask) ontarget:self withobject:nil animated:yes]; 

this show progress meter while method mytask running.

this code showwhileexecuting method.

- (void)showwhileexecuting:(sel)method ontarget:(id)target withobject:(id)object animated:(bool)animated {      methodforexecution = method;     targetforexecution = [target retain];     objectforexecution = [object retain];      // launch execution in new thread     taskinprogress = yes;     [nsthread detachnewthreadselector:@selector(launchexecution) totarget:self withobject:nil];      // show hud view     [self show:animated]; } 

if use call function mytask 1 of class properties change nsmutablestring nsdata object somewhere, , later on change nsstring. don't see anywhere in code causes change, it's kind of bug. memory getting corrupted? what's causing happen?

most it's memory (retain/release issue). if don't retain object, may released out under you. @ point, memory reclaimed os, may decide store else there. try turning on nszombies, , double checking retain/release/autoreleases.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -