Assigned Reading:
Slides As Shown:
Topics Covered:
Answer: Yes, but you dont' want to. See C++ FAQ Lite for a complete disucssion. Basically, you end up freeing the same memory twice, because the object's destructor will be called again, when the object goes out of scope. This is not good. Here are two programs demonstrating bad behavior: bad6.cpp, bad7.cpp.
The C++ FAQ mentions one situation where explict invocation of an object's destructor makes sense. This situation involves placment new which we will not discuss.