Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-03-08 21:52:27


on 3/8/00 9:25 PM, John Panzer at jpanzer_at_[hidden] wrote:

> Or (3) do people not feel that this is a real issue?

Oh, it's a real issue all right. I've had 2 of my colleagues (one junior,
one senior) make this exact mistake with boost::shared_ptr. Probably the
best thing we could do is keep a debug-mode-only registry of all smart
pointers so that we can detect this case. Even this technique, however, will
fail to detect problems in the face of smart_pointer<Derived> ->
smart_pointer<Base> conversions (the address changes!)

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk