|
Boost Users : |
Subject: Re: [Boost-users] Problem with shared_ptr
From: Germán Diago (germandiago_at_[hidden])
Date: 2009-01-14 08:56:17
2009/1/14 Peter Dimov <pdimov_at_[hidden]>
> Germán Diago:
> ...
>
>> std::vector<boost::shared_ptr<DerivedClass> >
>> result(get_base_objects.size());
>>
>
> You're creating a vector full of NULLs here. :-)
>
True!!! What I wanted is result.reserve(get_base_objects.size())
Thank you. Corrected.
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