Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr to stack-allocated object
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-12-05 09:39:47


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 04 December 2008 19:42 pm, Jason Cipriani wrote:
> Thanks for the tip. In this case, function needs to take a shared_ptr
> as it is used in other contexts with shared_ptr's, it's only sometimes
> used with objects from the stack.

There is always shared_ptr::get() and shared_ptr::operator*() to pass
shared_ptr-owned objects to functions taking raw pointers/references.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJOT005vihyNWuA4URAmunAJ9OFXY2p7OK1IbqvPE/qvTXVFF7JACbBHA+
02Q+b0bQU3Fxe6fsRvkclX8=
=I0a3
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net