Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: Source/WebCore/platform/text/LocaleICU.cpp

Issue 10958068: Merge 129191 - [Platform] There are memory leak in LocaleICU (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011,2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011,2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 , m_shortTimeFormat(0) 61 , m_shortTimeFormat(0)
62 , m_didCreateTimeFormat(false) 62 , m_didCreateTimeFormat(false)
63 #endif 63 #endif
64 { 64 {
65 } 65 }
66 66
67 LocaleICU::~LocaleICU() 67 LocaleICU::~LocaleICU()
68 { 68 {
69 unum_close(m_numberFormat); 69 unum_close(m_numberFormat);
70 udat_close(m_shortDateFormat); 70 udat_close(m_shortDateFormat);
71 #if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
72 udat_close(m_mediumTimeFormat);
73 udat_close(m_shortTimeFormat);
74 #endif
71 } 75 }
72 76
73 PassOwnPtr<LocaleICU> LocaleICU::create(const char* localeString) 77 PassOwnPtr<LocaleICU> LocaleICU::create(const char* localeString)
74 { 78 {
75 return adoptPtr(new LocaleICU(localeString)); 79 return adoptPtr(new LocaleICU(localeString));
76 } 80 }
77 81
78 PassOwnPtr<LocaleICU> LocaleICU::createForCurrentLocale() 82 PassOwnPtr<LocaleICU> LocaleICU::createForCurrentLocale()
79 { 83 {
80 return adoptPtr(new LocaleICU(0)); 84 return adoptPtr(new LocaleICU(0));
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 const Vector<String>& LocaleICU::timeAMPMLabels() 422 const Vector<String>& LocaleICU::timeAMPMLabels()
419 { 423 {
420 initializeDateTimeFormat(); 424 initializeDateTimeFormat();
421 return m_timeAMPMLabels; 425 return m_timeAMPMLabels;
422 } 426 }
423 427
424 #endif 428 #endif
425 429
426 } // namespace WebCore 430 } // namespace WebCore
427 431
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698