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

Unified Diff: src/hunspell/hashmgr.cxx

Issue 8574050: Remove 1 exit time destructor from our local changes to hunspell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/hunspell/
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hunspell/hashmgr.cxx
===================================================================
--- src/hunspell/hashmgr.cxx (revision 96723)
+++ src/hunspell/hashmgr.cxx (working copy)
@@ -416,8 +416,9 @@
// This function is only ever called by one place and not nested. We can
// therefore keep static state between calls and use |col| as a "reset" flag
// to avoid changing the API. It is set to -1 for the first call.
- static hunspell::WordIterator word_iterator =
- bdict_reader->GetAllWordIterator();
+ // Allocate the iterator on the heap to prevent an exit time destructor.
+ static hunspell::WordIterator& word_iterator =
+ *new hunspell::WordIterator(bdict_reader->GetAllWordIterator());
if (col < 0) {
col = 1;
word_iterator = bdict_reader->GetAllWordIterator();
« no previous file with comments | « google.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698