-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Tgui::Gui has virtual methods but no virtual destructor #12
Comments
But is it really needed to implement a virtual destructor? It is only needed when you are using a pointer to a derived class. And Gui isn't intended to be used as base class, neither should u use new and delete. |
The usage of new and delete with tgui::Gui in my circumstance comes from binding TGUI to a scripting language. |
I suppose instead of using new/delete I could create a global container of GUI instances... Edit: Extra, unnecessary copying would be involved too in making the global container hack... |
Using new/delete is ok then in your situation, and you should be able to safely ignore this warning. |
Removing the virtual keyword from all members that have it is an option too... |
I'll look into this later. I'm currently writing something for LD, so I don't want to spend too much time on my gui right now. |
No problem |
This occurs when using dynamic allocation via operator new and operator delete for tgui::Gui instances.
The text was updated successfully, but these errors were encountered: