Boost logo

Boost Users :

From: Edward Diener (eddielee_at_[hidden])
Date: 2002-11-06 16:26:31


There is no boost::shared_ptr<> in your example.

"Collin Peters" <yg-boost-users_at_[hidden]> wrote in message
news:aqc015$n3p$1_at_main.gmane.org...
> 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;
> }


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