-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update deconstructor(chain) in all projects #101
Comments
This destructor should be sufficient for the derived application classes: DearImGuiApplication::~DearImGuiApplication()
{
_deviceContext->Flush();
#if !defined(NDEBUG)
_debug->ReportLiveDeviceObjects(D3D11_RLDO_FLAGS::D3D11_RLDO_DETAIL);
#endif
} I removed all |
I personally think ExampleApplication app("Example");
app.Init();
app.Run();
app.Destroy(); This does add a bit of boilerplate code but it ultimately gives a bit more control and can be a good concept to deliver to readers who are not yet familiar with C++ or programming in general. In my own application I even give the caller the responsibility of handling the frame loop and calling |
I believe that was my initial intention, to call Cleanup in App::Run() after the gameloop, it is protected already (imho) (if not then yes it should be protected virtual) That would render the dtor useless and we could technically remove it - unless c++ works differently again |
The destructor can be simply replaced with the following, as virtual ~Application() = default;
~Derived() = default; Marking the |
looks fishy
The text was updated successfully, but these errors were encountered: