From: Thomas Witt (witt_at_[hidden])
Date: 2002-05-15 04:41:40
-----BEGIN PGP SIGNED MESSAGE-----
On Tuesday 14 May 2002 20:02, Peter Dimov wrote:
> This will no longer be necessary with 1.28.0; we've removed operator* and
> operator-> from weak_ptr as unsafe. Now the only way to do something with a
> weak_ptr is to construct a shared_ptr first, via its constructor or
can you explain why make_shared adds safety. Currently I am unable to see why.
IIUC what happens is a NULL ptr is dereferenced with or without make_shared.
On the first look it seems as if make_shared pretends to be safe but isn't.
When make shared is used the object might be gone already.
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk