by kiriin · 4y ago · 0 comments
None of that should be shared_ptr, in fact they shouldn't be pointers at all.
>auto flappy = std::make_shared<FlappyBird>(); >flappy->run();
That would work just fine as a global in main.cpp
FlappyBird flappy;
FlappyBird().run();You should not pay the performance hit for features you don't need in a particular program.
In fact: It is reasonable for C++ programs to NOT use all language features.