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

Unified Diff: base/memory/ref_counted.h

Issue 10416003: RefCounted types should not have public destructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
Index: base/memory/ref_counted.h
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h
index cf8ff1688dc7f4de093f78d15a17a1fade0ed0fe..fd4ed35b69e79172a2331408ef8a5aeb11b30f0d 100644
--- a/base/memory/ref_counted.h
+++ b/base/memory/ref_counted.h
@@ -164,6 +164,12 @@ class RefCountedData : public base::RefCounted< base::RefCountedData<T> > {
RefCountedData(const T& in_value) : data(in_value) {}
T data;
+
+ protected:
+ ~RefCountedData() {}
darin (slow to review) 2012/05/22 18:01:31 probably you want to make this destructor virtual
Ryan Sleevi 2012/05/22 18:36:20 See the thread I started on chromium-dev regarding
+
+ private:
+ friend class base::RefCounted<base::RefCountedData<T> >;
};
} // namespace base
« no previous file with comments | « no previous file | chrome/browser/net/load_timing_observer.h » ('j') | content/browser/download/download_resource_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698