diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 256: SceneShadow: Port potential memory leak fix from SceneRefract (detected in both

Message ID 20121217161016.1552.69161.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Jesse Barker Dec. 17, 2012, 4:10 p.m. UTC
------------------------------------------------------------
revno: 256
committer: Jesse Barker <jesse.barker@linaro.org>
branch nick: trunk
timestamp: Mon 2012-12-17 08:08:05 -0800
message:
  SceneShadow: Port potential memory leak fix from SceneRefract (detected in both
  scenes during code review for that branch merge).
modified:
  src/scene-shadow.cpp
  src/scene.h


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/scene-shadow.cpp'
--- src/scene-shadow.cpp	2012-10-22 21:43:11 +0000
+++ src/scene-shadow.cpp	2012-12-17 16:08:05 +0000
@@ -463,11 +463,6 @@ 
                                            "false,true");
 }
 
-SceneShadow::~SceneShadow()
-{
-    delete priv_;
-}
-
 bool
 SceneShadow::supported(bool show_errors)
 {
@@ -526,6 +521,7 @@ 
 {
     // Add scene-specific teardown here
     priv_->teardown();
+    delete priv_;
     Scene::teardown();
 }
 

=== modified file 'src/scene.h'
--- src/scene.h	2012-12-15 09:46:12 +0000
+++ src/scene.h	2012-12-17 16:08:05 +0000
@@ -563,7 +563,6 @@ 
     ShadowPrivate* priv_;
 public:
     SceneShadow(Canvas& canvas);
-    ~SceneShadow();
     bool supported(bool show_errors);
     bool load();
     void unload();