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

Unified Diff: base/memory/weak_ptr.h

Issue 10694111: RefCounted types should not have public destructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | base/threading/non_thread_safe.h » ('j') | base/threading/non_thread_safe.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr.h
diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h
index d7c452f1dbb0f796cd6e23f21542a606ee8fe10e..8485c146670d008fad8526f2614503b2368d7a8f 100644
--- a/base/memory/weak_ptr.h
+++ b/base/memory/weak_ptr.h
@@ -162,6 +162,10 @@ class SupportsWeakPtrBase {
return AsWeakPtrImpl<Derived>(t, *t);
}
+ protected:
+ SupportsWeakPtrBase() {}
+ ~SupportsWeakPtrBase() {}
+
private:
// This template function uses type inference to find a Base of Derived
// which is an instance of SupportsWeakPtr<Base>. We can then safely
« no previous file with comments | « no previous file | base/threading/non_thread_safe.h » ('j') | base/threading/non_thread_safe.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698