Is “delete this” allowed in C++?

The C++ FAQ Lite has a entry specifically for this

I think this quote sums it up nicely

As long as you’re careful, it’s OK for an object to commit suicide (delete this).

Leave a Comment