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

Unified Diff: base/memory/ref_counted.h

Issue 2533243002: Update base::scoped_refptr<> docs (Closed)
Patch Set: Created 4 years, 1 month 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/memory/ref_counted.h
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h
index 960c8a28453122a5e00a2cb72d5f420e7b642f15..3957bf82463f88264297eb6ffe846a0d92f9a784 100644
--- a/base/memory/ref_counted.h
+++ b/base/memory/ref_counted.h
@@ -224,6 +224,9 @@ class RefCountedData
//
// class MyFoo : public RefCounted<MyFoo> {
// ...
+// private:
+// friend class RefCounted<MyFoo>; // allow destruction by RefCounted<>
danakj 2016/11/30 00:00:08 Capitalize and period for each comment.
Thiemo Nagel 2016/11/30 10:41:24 Done.
+// ~MyFoo(); // destructor must be private/protected
// };
//
// void some_function() {
« 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