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
Post a Comment