diff options
author | Alexandros Frantzis <alexandros.frantzis@canonical.com> | 2012-12-15 11:46:12 +0200 |
---|---|---|
committer | Alexandros Frantzis <alexandros.frantzis@canonical.com> | 2012-12-15 11:46:12 +0200 |
commit | 3c0e8e2aefca4b74e6d387118c67b7bbe3622001 (patch) | |
tree | dff68986e2dfe9027a6b019c9f9d5498a6399456 | |
parent | 6f808b75d48e5c8ed98fd103098a677ca9ce2e9b (diff) | |
download | glmark2-3c0e8e2aefca4b74e6d387118c67b7bbe3622001.tar.gz |
SceneRefract: Fix potential memory leak
The memory leak occurs when using the scene for multiple benchmarks.
-rw-r--r-- | src/scene-refract.cpp | 6 | ||||
-rw-r--r-- | src/scene.h | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/scene-refract.cpp b/src/scene-refract.cpp index b936362..db0aec8 100644 --- a/src/scene-refract.cpp +++ b/src/scene-refract.cpp @@ -87,11 +87,6 @@ SceneRefract::SceneRefract(Canvas& canvas) : "false,true"); } -SceneRefract::~SceneRefract() -{ - delete priv_; -} - bool SceneRefract::supported(bool show_errors) { @@ -150,6 +145,7 @@ SceneRefract::teardown() { // Add scene-specific teardown here priv_->teardown(); + delete priv_; Scene::teardown(); } diff --git a/src/scene.h b/src/scene.h index 88f839d..66377e1 100644 --- a/src/scene.h +++ b/src/scene.h @@ -580,7 +580,6 @@ class SceneRefract : public Scene RefractPrivate* priv_; public: SceneRefract(Canvas& canvas); - ~SceneRefract(); bool supported(bool show_errors); bool load(); void unload(); |