When you create an object by using placement new, you should not call delete on a pointer to the object. Instead you should call it's destructor.
Reference: Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions by Herb Sutter. Addison-Wesley, 1999, p. 42.
Saturday, November 13, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment