R
Roland Pibinger
Which classic C++ idiom. When the object is conceptually
"owned" by another object, that object deletes it. When the
object doesn't have an owner, it deletes itself.
That works in a few limited cases, but most entity objects have
lifetimes which are independant of scope or of any other object.
I have had a contrary experience. It's more a matter of design than an
implementation limitation. When you design an application with
'Creator As Sole Owner' and RAII in mind things fall into place quite
naturally and questions like 'which is the right scope for an owner'
are easy to answer.