I don't believe the above statement will affect me, but I just want to be sure
Correct. A language-level array is not an STL container. There IS a shared_ptr-like template called shared_array that calls "delete []" instead of "delete". Had to look that one up. It doesn't get used much. std::vector is a superior choice (in every situation I can think of). An STL container of shared_ptr's is just fine. Just don't create a circular reference. --Mark Storer Software Engineer Cardiff Software #include <disclaimer> typedef std::disclaimer<Cardiff> Discard; -----Original Message----- From: Collin Peters [mailto:yg-boost-users@m.gmane.org] Sent: Wednesday, November 06, 2002 1:04 PM To: boost-users@yahoogroups.com Subject: [Boost-Users] shared_ptr capabilities http://www.boost.org/libs/smart_ptr/shared_ptr.htm states that: "Normally, a shared_ptr cannot correctly hold a pointer to a dynamically allocated array. See shared_array for that usage." What I hope to use shared_ptr for, is to store pointers to a class in a vector, and that class will also have a vector that stores pointers via shared_ptr. example: class Foo { int a; } class one { int var1; int var2; std::vector<Foo> foo_vector; } class two { std::vector<one> one_vector; } I don't believe the above statement will affect me, but I just want to be sure Collin Peters Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/