Index: base/i18n/time_formatting.cc |
diff --git a/base/i18n/time_formatting.cc b/base/i18n/time_formatting.cc |
index 95d481e7190ea55f01fd6507e34163dec24f3db6..419e8db0500631b2c7d1256d5a09f3a9918d0d76 100644 |
--- a/base/i18n/time_formatting.cc |
+++ b/base/i18n/time_formatting.cc |
@@ -73,8 +73,8 @@ string16 TimeFormatTimeOfDayWithHourClockType(const Time& time, |
// use (some locales use '.' instead of ':'), and where to put the am/pm |
// marker. |
UErrorCode status = U_ZERO_ERROR; |
- icu::DateTimePatternGenerator *generator = |
- icu::DateTimePatternGenerator::createInstance(status); |
+ scoped_ptr<icu::DateTimePatternGenerator> generator( |
+ icu::DateTimePatternGenerator::createInstance(status)); |
CHECK(U_SUCCESS(status)); |
const char* base_pattern = (type == k12HourClock ? "ahm" : "Hm"); |
icu::UnicodeString generated_pattern = |