Boost logo

Boost Users :

Subject: Re: [Boost-users] [array][smart_ptr] Using shared_ptr vs shared_array for a boost::array
From: Ryan McConnehey (mccorywork_at_[hidden])
Date: 2010-08-11 21:44:55


Steven Watanabe wrote:
> AMDG
>
> 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? Should I bother and convert over to
>> shared_array?
>
> No.
>
>> I would have expected a problem with boost::array and shared_ptr but
>> I'm unsure about expected behavior.
>
> boost::array is an ordinary object. The fact that it contains
> an array doesn't affect memory management.
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

Thank you for the clarification.

Ryan


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