title: Application crash when i am using CFRelease
body: <p>I am trying to understand how should I use CFRelease. I think I don't use it right. The application crash when I am trying to release. </p>
  
  <pre><code>            if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")){
              //get phone numbers
              ABMultiValueRef emails = ABRecordCopyValue((__bridge ABRecordRef)person,kABPersonEmailProperty);
              for(CFIndex i=0;i&lt;ABMultiValueGetCount(emails);++i) {
                  CFStringRef mEmailRef = ABMultiValueCopyValueAtIndex(emails, i);
                  CFStringRef mEmailTypeRef = ABMultiValueCopyLabelAtIndex(emails, i);
                  NSString * type = (__bridge NSString*) mEmailTypeRef;
                  NSString * email = (__bridge NSString*) mEmailRef;
                  NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"!$_&gt;&lt;"];
                  type = [[type componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""];
                  if (!email || [email length]==0 || !type || [type length]==0) {
  
                  }else
                      [GlobalFunctions addValue:email andKey:CONTACT_EMAIL toGroup:type inArray:array];
  
                  if (mEmailRef) {
                      CFRelease(mEmailRef);
                  }
                  if (mEmailTypeRef) {
                      CFRelease(mEmailTypeRef); // crash
                  }
                  if (emails) {
                      CFRelease(emails);
                  }
  
              }
  
  
          }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/c78Hg.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Kj6Zo.png" alt="enter image description here"></p>
  
  <p>EDIT:</p>
  
  <p>I found the problem, the email object was released in the for loop but create before. </p>