[array][smart_ptr] Using shared_ptr vs shared_array for a boost::array

11 Aug
2010
11 Aug
'10
3:20 p.m.
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? Should I bother and convert over to shared_array? I would have expected a problem with boost::array and shared_ptr but I'm unsure about expected behavior. Ryan

11 Aug
11 Aug
3:41 p.m.
New subject: [array][smart_ptr] Using shared_ptr vs shared_array for a boost::array
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 11 August 2010, Ryan McConnehey wrote:
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-----
5435
Age (days ago)
5436
Last active (days ago)
3 comments
3 participants
participants (3)
-
Frank Mori Hess
-
Ryan McConnehey
-
Steven Watanabe