Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-27 06:11:47


Vladimir Prus <ghost_at_[hidden]> writes:

> Now the key question. Why do I need the tracking if I never save an object
> with the same address both by pointer and by value. I don't.

Surely if you have an object graph where everything is saved by
pointer you want to track those cases as well?

> In some other part of program, I might be serializing vector<X*>,
> but as long as none of those pointers point to stack objects, I
> don't need tracking in the above loop.

Tracking in the above loop wouldn't help you if those pointers pointed
to stack objects, because, for that other part of the program to be
legal, the pointers would have to point to stack objects other than
the ones in the loop, which have all been destroyed by that point.

-- 
Dave Abrahams
Boost Consulting
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