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

Unified Diff: base/path_service.cc

Issue 1487213004: Make PathData's LazyInstance Leaky (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/path_service.cc
diff --git a/base/path_service.cc b/base/path_service.cc
index 97a0ce5c02c932be4acb46284c439ef7dd50eeec..3b9b69e17375813eb97b2ff0fa6bcf4e53d7f59e 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -126,19 +126,9 @@ struct PathData {
providers = &base_provider_posix;
#endif
}
-
- ~PathData() {
- Provider* p = providers;
- while (p) {
- Provider* next = p->next;
- if (!p->is_static)
- delete p;
- p = next;
- }
- }
};
-static LazyInstance<PathData> g_path_data = LAZY_INSTANCE_INITIALIZER;
+static LazyInstance<PathData>::Leaky g_path_data = LAZY_INSTANCE_INITIALIZER;
static PathData* GetPathData() {
return g_path_data.Pointer();
« 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