I'd like some clarification on the correct way to destroy an object.
I've seen a couple of open source projects make use of object factories to
instantiate classes and smart pointers to destroy them when the ref_count
reaches zero. Something like:
pInstance = Factory::createSomething();
{
smart_ptr<Somethingptr = pInstance