0
NSString *mob = (__bridge_transfer NSString *)ABMultiValueCopyValueAtIndex(mobNum, emailCounter);
                mob = [ApplicationSingleton FindMobileNumber:mob];
                if ([favos rangeOfString:mob].location != NSNotFound)

it gives below message when checking for memory leaks...

the receiver of message "rangeOfString:" is nil and returns a value of type NSRange that will be garbage

can anyone please help me... Thanks in advance...

Anand
  • 1,129
  • 7
  • 29

1 Answers1

0

It seems that favos is nil. Make sure that the variable is set in all code paths, or check it for nil.

ekholm
  • 2,543
  • 18
  • 18
  • No dear i am assigning the value to it and it works perfeclty fine,just i want to get off with the memory leak warning – Anand Aug 22 '12 at 13:32
  • Did you try adding the nil check? Maybe the analyzer can't see that favos always will be assigned to. – ekholm Aug 22 '12 at 13:55