Saturday, November 13, 2010

Placement New

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.

No comments:

Post a Comment