Boost logo

Boost Users :

Subject: Re: [Boost-users] [array][smart_ptr] Using shared_ptr vs shared_array for a boost::array
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2010-08-11 11:41:07


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

On Wednesday 11 August 2010, Ryan McConnehey wrote:
> I currently have a boost::array in a share_ptr. This compiles and
> doesn't cause memory leaks. Should I expect memory leaks since I'm not
> using shared_array?

No, you'll only have problems if you give shared_ptr a plain old array that
needs to be deleted with an array delete [].

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkxixJMACgkQ5vihyNWuA4XOrACaA8NiVy46sfoKH2FvnLNTfHQ4
cVsAoNjUOT5YCF50M3Epycg+jJIgPjmm
=AbGd
-----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