|
-
November 4th, 2005, 02:13 PM
#4
Re: Regarding placement new
Just like Siddhartha said, you need to call the destructor to destroy the object and then you still need to free the memory allocated with new char[16].
NOTE: Placement new should be avoided as much as possible and should only be used if you know exactly what you are doing. Placement new will not check for properly alignment of your object etc.
Some more information about it can be found at http://www.parashift.com/c++-faq-lit...html#faq-11.10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|