cocoa - Objective-C & Compare two NSStrings -


i trying compare 2 nsstrings see if match app keeps crashing exc_bad_access , shows me assembly output , not location within code keeps crashing.

here compare:

nsstring *comparealarm = [lbltime stringvalue]; [lbltime setstringvalue:[self gettime]];  if ([salarmtime isequaltostring:comparealarm]) {     nslog(@"alarm hit"); }  [comparealarm release]; 

does see why fail? if comment out if statement crash stops.

thanks in advanced.

you aren't retaining comparealarm release it.


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -