From 9edd3beebc5c7627aa885d498a30994f2eede1a8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 5 Nov 2005 14:33:42 +0000 Subject: [PATCH] Added a note that it's not necessary to initialize _internal_weak_this. [SVN r31565] --- sp_techniques.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sp_techniques.html b/sp_techniques.html index d41be4b..e046275 100644 --- a/sp_techniques.html +++ b/sp_techniques.html @@ -519,6 +519,9 @@ public: } } +

Note that you no longer need to manually initialize the weak_ptr member + in enable_shared_from_this. + Constructing a shared_ptr to impl takes care of that.

Using shared_ptr as a smart counted handle

Some library interfaces use opaque handles, a variation of the incomplete class technique described above. An example: