|
Boost : |
From: Thomas Witt (witt_at_[hidden])
Date: 2002-09-09 10:00:50
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I would like to see the attached patch applied to scoped_ptr.hpp.
Rationale:
ptr != p should be a precondition violation. I can't think of a good reason
why a scoped_ptr should be reset with a pointer that is already taken care of
by a scoped ptr.
The current code fails if the dtor is called during a call to reset. Yes,
things like this can happen. The managed ptr will be deleted twice.
Comments?
- --Thomas
- --
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9fLem0ds/gS3XsBoRAuTvAJ9eEU2a+/P2SAsI9mvd7TbPwMNISACcCXeU
UAmJKzXUFz3jpcvAlE/aD1U=
=K3ND
-----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