Index: base/memory/weak_ptr.h |
diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h |
index 8a433922fdf0009f1bc4ed0a1a0caa146a798977..1230ead14bf76513cfbc63e22a855db35ac91787 100644 |
--- a/base/memory/weak_ptr.h |
+++ b/base/memory/weak_ptr.h |
@@ -16,6 +16,7 @@ |
// |
// class Controller { |
// public: |
+// Controller() : weak_factory_(this) {} |
Nico
2015/09/11 18:41:39
It's not always `this`, is it? It's just the point
scheib
2015/09/11 19:40:29
True, but in this example the factory vends Contro
|
// void SpawnWorker() { Worker::StartNew(weak_factory_.GetWeakPtr()); } |
// void WorkComplete(const Result& result) { ... } |
// private: |