title: Does Dart reuse DateTime instances?
body: <p>I'm fiddling around with <code>GlobalObjectKey</code>, where my objects are <code>DateTime</code> instances. I noticed that if I create new instances of the same date and time, I get the same instance "ID":</p>
  
  <pre><code>DateTime newInstance = new DateTime.fromMicrosecondsSinceEpoch(datetime.microsecondsSinceEpoch);
  </code></pre>
  
  <p>My debug prints say that there are two separate keys with the same id:</p>
  
  <pre><code>[GlobalObjectKey DateTime#f056e] // Key assigned to Widget1
  [GlobalObjectKey DateTime#f056e] // Key assigned to Widget2
  </code></pre>
  
  <p>However, even though the keys seem to be duplicates, I don't seem to get any widget/build errors.</p>
  
  <p>Here's a more complete example of what I'm doing:</p>
  
  <pre><code>class DateTimeKey{
    GlobalObjectKey key;
    DateTimeKey(DateTime datetime){
      DateTime newInstance = new DateTime.fromMicrosecondsSinceEpoch(datetime.microsecondsSinceEpoch);
      key = new GlobalObjectKey(newInstance);
    }
  }
  
  ...
  
  List&lt;DateTimeKey&gt; _bookingListMonthKeys = [];
  List&lt;DateTimeKey&gt; _bookingListDayKeys = [];
  
  DateTimeKey _monthKey = new DateTimeKey(theDate);
  _bookingListMonthKeys.add(_monthKey);
  
  DateTimeKey _dayKey = new DateTimeKey(theDate); // theDate here refers to the same DateTime instance as above
  _bookingListDayKeys.add(_dayKey);
  </code></pre>
  
  <p>Even if I loop through both lists and cross reference them like this</p>
  
  <pre><code>  _bookingListDayKeys.forEach((dayKey){
      _bookingListMonthKeys.forEach((monthKey){
        if( identical(dayKey, monthKey) )
          print('Identical DateTimeKeys found: $dayKey, $monthKey');
  
        if( identical(dayKey.key, monthKey.key) )
          print('Identical GlobalObjectKeys found: ${dayKey.key}, ${monthKey.key}');
      });
    });
  </code></pre>
  
  <p>it doesn't show any duplicates, yet the printouts above clearly have the same "id" (<code>#f056e</code>). Can someone explain what's going on here?</p>