diff --git a/scoped_ptr.htm b/scoped_ptr.htm index a301fa6..d684b6b 100644 --- a/scoped_ptr.htm +++ b/scoped_ptr.htm @@ -22,9 +22,9 @@
Because scoped_ptr is simple, in its usual implementation every operation is as fast as for a built-in pointer and it has no more space overhead that a built-in pointer.
-scoped_ptr cannot be used in C++ Standard Library - containers. Use shared_ptr if you need - a smart pointer that can.
+scoped_ptr cannot be used in C++ Standard Library containers. + Use shared_ptr if you need a smart pointer + that can.
scoped_ptr cannot correctly hold a pointer to a dynamically allocated array. See scoped_array for that usage.
@@ -160,10 +160,10 @@ Buckle my shoeQ. Why doesn't scoped_ptr have a release() member?
A. When reading source code, it is valuable to be able to draw
conclusions about program behavior based on the types being used. If scoped_ptr
- had a release() member, it would become possible to transfer ownership out of
- its scope, weakening its role as a way of limiting resource lifetime to a given
- scope. Use std::auto_ptr where transfer of ownership is
- required. (supplied by Dave Abrahams)
Revised 17 September 2002