Virtualize destructors to make sure they get called

May actually prevent a leak or two.
This commit is contained in:
archshift 2014-09-06 23:44:36 -07:00
parent 335082e74e
commit d11d14eb8c
7 changed files with 7 additions and 6 deletions

View file

@ -11,7 +11,7 @@
class EmuWindow_GLFW : public EmuWindow {
public:
EmuWindow_GLFW();
~EmuWindow_GLFW();
~EmuWindow_GLFW() override;
/// Swap buffers to display the next frame
void SwapBuffers();

View file

@ -87,7 +87,7 @@ class GRenderWindow : public QWidget, public EmuWindow
public:
GRenderWindow(QWidget* parent = NULL);
~GRenderWindow();
~GRenderWindow() override;
void closeEvent(QCloseEvent*);

View file

@ -31,6 +31,7 @@ class NonCopyable
protected:
NonCopyable() {}
NonCopyable(const NonCopyable&&) {}
~NonCopyable() { };
void operator=(const NonCopyable&&) {}
private:
NonCopyable(NonCopyable&);

View file

@ -16,7 +16,7 @@ public:
num_instructions = 0;
}
~ARM_Interface() {
virtual ~ARM_Interface() {
}
/**

View file

@ -14,7 +14,7 @@ class ARM_Interpreter : virtual public ARM_Interface {
public:
ARM_Interpreter();
~ARM_Interpreter();
~ARM_Interpreter() override;
/**
* Set the Program Counter to an address

View file

@ -19,7 +19,7 @@ public:
RendererBase() : m_current_fps(0), m_current_frame(0) {
}
~RendererBase() {
virtual ~RendererBase() {
}
/// Swap buffers (render frame)

View file

@ -17,7 +17,7 @@ class RendererOpenGL : virtual public RendererBase {
public:
RendererOpenGL();
~RendererOpenGL();
~RendererOpenGL() override;
/// Swap buffers (render frame)
void SwapBuffers();