title: NSMutableDictionary setObject:forKey (ios 6 without ARC) results in NULL
body: <p>The following code was working prior to upgrading to iOS 6.  It works in the 5.1 iPhone simulator as well, but fails with 6.0 simulator and device.</p>
  
  <p>Trying to setObject:forKey in a loop to an NSMutableDictionary.  Have tried adding in the loop (as the following code shows) and also tried by initializing with arrays for objects and keys which results in the same failure.  Another strange bit of information is that sometimes it works but fails most of the time.  The object being added is a UILocalNotification and the key is an object that represents a WeekDay (more than a simple string).  The output of running is shown below.  The UILocalNotifications and keys are clearly not NULL but the added pair in the MutableDictionary has NULL for some of the objects most of the time.  Mostly it's the last added day (key) whose object is null.  I'm completely at a loss as to how this breaking, thanks in advance for any help!</p>
  
  <p>copy method for WeekDay (NSCopying Protocol):</p>
  
  <pre><code>- (id)copyWithZone:(NSZone *)zone
  {
      WeekDay * copy = [[WeekDay alloc] initWithDay:self.day];
      return copy;
  }
  </code></pre>
  
  <p>code snippet using setObject:forKey:</p>
  
  <pre><code>NSMutableDictionary * newAlarmsDictionary = [[NSMutableDictionary alloc] init];
  NSArray * theDayKeys = [[_daysEnabledDict allKeys] sortedArrayUsingSelector:@selector(compare:)];
  
  NSMutableArray * tempNotifyArray = [[NSMutableArray alloc] init];
  UILocalNotification * theAlarm = nil;
  WeekDay * theWeekDay = nil;
  
  for (int i=0; i &lt; [theDayKeys count]; i++) {
  
      if ([[_daysEnabledDict objectForKey:[theDayKeys objectAtIndex:i]] boolValue] == TRUE) {
  
          theWeekDay = [theDayKeys objectAtIndex:i];
  
          NSDate * now = [NSDate date];
  
  ... deleted lines setting up fire date for UILocalNotification, not significant to problem ...
  
          theAlarm = [[UILocalNotification alloc] init];
          theAlarm.fireDate = itemDate;
          theAlarm.repeatInterval = NSWeekCalendarUnit;
          theAlarm.timeZone = [NSTimeZone localTimeZone];
          theAlarm.soundName = UILocalNotificationDefaultSoundName;
          theAlarm.applicationIconBadgeNumber = 0;
  
          [newAlarmsDictionary setObject:theAlarm forKey:theWeekDay];
          [tempNotifyArray addObject:theAlarm];
          [theAlarm release];
          }
      }
  }
  NSLog(@"--Debug: tempNotifyArray---- %@ -------------", tempNotifyArray);
  NSLog(@"--Debug: newAlarmsDictionary ====== %@ =============", newAlarmsDictionary);
  </code></pre>
  
  <p>Here is the output of the two NSlog statements at the end of the code snippet.  This particular run adds 4 notifications, for days wed thru sat.  The 'alarms' put into the tempNotifyArray are valid but when added to the dictionary (one in this case) is null.</p>
  
  <pre><code>2012-11-26 11:07:01.087 MedTrack[9728:11303] --Debug: tempNotifyArray---- (
  
  "&lt;UIConcreteLocalNotification: 0x7277940&gt;{fire date = Wednesday, November 28, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Wednesday, November 28, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}",
  
  
  "&lt;UIConcreteLocalNotification: 0x8883280&gt;{fire date = Thursday, November 29, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Thursday, November 29, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}",
  
  
  "&lt;UIConcreteLocalNotification: 0x75c6590&gt;{fire date = Friday, November 30, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Friday, November 30, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}",
  
  
  "&lt;UIConcreteLocalNotification: 0x75c83e0&gt;{fire date = Saturday, December 1, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Saturday, December 1, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}"
  </code></pre>
  
  <p>) -------------</p>
  
  <pre><code>2012-11-26 11:07:01.097 MedTrack[9728:11303] --Debug: newAlarmsDictionary ====== {
  
  
  "[WeekDay] 6 (Sat)" = (null);
  
  
  "[WeekDay] 3 (Wed)" = "&lt;UIConcreteLocalNotification: 0x7277940&gt;{fire date = Wednesday, November 28, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Wednesday, November 28, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}";
  
  
  "[WeekDay] 4 (Thu)" = "&lt;UIConcreteLocalNotification: 0x8883280&gt;{fire date = Thursday, November 29, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Thursday, November 29, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}";
  
  
  "[WeekDay] 5 (Fri)" = "&lt;UIConcreteLocalNotification: 0x75c6590&gt;{fire date = Friday, November 30, 2012, 11:06:00 AM Eastern Standard Time, time zone = America/Toronto (EST) offset -18000, repeat interval = NSWeekCalendarUnit, repeat count = UILocalNotificationInfiniteRepeatCount, next fire date = Friday, November 30, 2012, 11:06:00 AM Eastern Standard Time, user info = {\n    Temp = Fred;\n}}";    
  </code></pre>