|
Boost Users : |
Subject: Re: [Boost-users] shared_ptr vs pass object by reference
From: gast128 (gast128_at_[hidden])
Date: 2010-08-11 15:31:44
> > I use shared_ptr like a "poor-man's" garbage collection. Instead of having
>
> Ahh, being a c++ developer I see garbage collection as a poor man's raii
(you can't even control when
> something is destructed for gods' sake ;))
>
Perhaps, but shared_ptr's may fail here either. Atm shared_ptr to object being
constructed (thru enable_shared_from_this) cant be dealt out in constructors
which make it impossible to build parent child relation ships at constructor
time if the child needs a weak_ptr to parent.
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