|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-09-21 19:13:44
From: "Peter Dimov" <pdimov_at_[hidden]>
> > Is there an example which maps naturally onto non-intrusive use of
> > weak_ptr?
>
> std::vector< shared_ptr<GameObject> > objects;
Hmm...
How do the GameObjects die when fired upon? Something has to remove them
from the vector. Maybe you need std::set<> here instead?
-----------------------------------------------------------
David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk