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

Unified Diff: net/url_request/sdch_dictionary_fetcher.h

Issue 2075033003: Make SdchDictionaryFetcher free more memory when done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oops Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/url_request/sdch_dictionary_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/sdch_dictionary_fetcher.h
diff --git a/net/url_request/sdch_dictionary_fetcher.h b/net/url_request/sdch_dictionary_fetcher.h
index e4b7c4fe51901d83b473c4331b8fcce9562be4fe..ea59582d80b8ac079729abd90de93d69d8f4308e 100644
--- a/net/url_request/sdch_dictionary_fetcher.h
+++ b/net/url_request/sdch_dictionary_fetcher.h
@@ -112,8 +112,10 @@ class NET_EXPORT SdchDictionaryFetcher : public URLRequest::Delegate,
scoped_refptr<IOBuffer> buffer_;
OnDictionaryFetchedCallback current_callback_;
- // The currently accumulating dictionary.
- std::string dictionary_;
+ // The currently accumulating dictionary. Stored as a unique_ptr so all memory
+ // it consumes can be easily freed, as it gets quite big, and
+ // std::string::clear() may not free memory.
+ std::unique_ptr<std::string> dictionary_;
// Store the URLRequestContext associated with the owning SdchManager for
// use while fetching.
« no previous file with comments | « no previous file | net/url_request/sdch_dictionary_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698