diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 18:56:05 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 18:56:05 +0000 |
commit | b6a9c04f3a001161f90c68dd27ac849b4b03392b (patch) | |
tree | 040ddcf54f290b64d38bf23532b4959531a09374 /ui/base/l10n | |
parent | 687c42c03483c131935203dc96a3be106f89a66b (diff) | |
download | chromium_src-b6a9c04f3a001161f90c68dd27ac849b4b03392b.zip chromium_src-b6a9c04f3a001161f90c68dd27ac849b4b03392b.tar.gz chromium_src-b6a9c04f3a001161f90c68dd27ac849b4b03392b.tar.bz2 |
Remove the remaining 6 exit time destructors and 2 static initializers from ui/
BUG=101600,94925
TEST=none
Review URL: http://codereview.chromium.org/8475006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/l10n')
-rw-r--r-- | ui/base/l10n/l10n_util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc index 2885a8f..e639c19 100644 --- a/ui/base/l10n/l10n_util.cc +++ b/ui/base/l10n/l10n_util.cc @@ -780,7 +780,9 @@ void SortStrings16(const std::string& locale, } const std::vector<std::string>& GetAvailableLocales() { - static std::vector<std::string> locales; + // Allocate this on the heap and leak it, so that no destructor needs to run + // at exit time. + static std::vector<std::string>& locales = *new std::vector<std::string>; if (locales.empty()) { int num_locales = uloc_countAvailable(); for (int i = 0; i < num_locales; ++i) { |