From 5616a1a87231217e449ed9f05792250bc9df4448 Mon Sep 17 00:00:00 2001
From: Peter Dimov make_shared_from_COM
. Weak pointers
created from pw
will be invalidated when the last shared_ptr
is destroyed, regardless of whether the COM object itself is still alive.
As explained in the mem_fn
documentation,
+ you need to #define
+ BOOST_MEM_FN_ENABLE_STDCALL first.
shared_ptr
to hold a pointer to an object
with an embedded reference countThis is a generalization of the above technique. The example assumes that the @@ -753,8 +756,8 @@ public:
$Date$
Copyright © 2003 Peter Dimov. Permission to copy, use, modify, sell and - distribute this document is granted provided this copyright notice appears in - all copies. This document is provided "as is" without express or implied - warranty, and with no claim as to its suitability for any purpose.
+ distribute this document is granted provided this copyright notice appears in + all copies. This document is provided "as is" without express or implied + warranty, and with no claim as to its suitability for any purpose.