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

Unified Diff: base/lazy_instance.h

Issue 16440006: Annotate LeakyLazyInstance as a leak. Remove HeapChecker suppressions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/lazy_instance.h
diff --git a/base/lazy_instance.h b/base/lazy_instance.h
index 7021829e563a0facdb65c68fb7f70c2f1997891d..3935780a55b7352ba78611944b48fa3cfce15d14 100644
--- a/base/lazy_instance.h
+++ b/base/lazy_instance.h
@@ -40,6 +40,7 @@
#include "base/atomicops.h"
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/debug/leak_annotations.h"
#include "base/logging.h"
#include "base/memory/aligned_memory.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
@@ -91,6 +92,7 @@ struct LeakyLazyInstanceTraits {
static const bool kAllowedToAccessOnNonjoinableThread = true;
static Type* New(void* instance) {
+ ANNOTATE_SCOPED_MEMORY_LEAK;
return DefaultLazyInstanceTraits<Type>::New(instance);
}
static void Delete(Type* instance) {
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698