“delete this” in constructor
Note: This answer applies to C++03, and it seems like the behavior was changed in C++11 and higher so that this is now undefined behavior. It turns out that in this particular case the code is legal, but you’re ε-away from undefined behavior. The C++03 standard defines the notion of the “lifetime” of an object … Read more