]> git.tdb.fi Git - libs/vr.git/commitdiff
Fix memory leaks master
authorMikko Rasa <tdb@tdb.fi>
Fri, 7 Oct 2016 22:27:34 +0000 (01:27 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 7 Oct 2016 22:27:34 +0000 (01:27 +0300)
source/stereocombiner.cpp
source/stereocombiner.h
source/stereoview.cpp
source/stereoview.h

index 34c13bdb6856e26aaa72a6365cafeec4d2efa201..dbbe81509909fd589b7271d985c10e58fa674505 100644 (file)
@@ -37,6 +37,11 @@ StereoCombiner::StereoCombiner():
        mirror(0)
 { }
 
        mirror(0)
 { }
 
+StereoCombiner::~StereoCombiner()
+{
+       delete mirror;
+}
+
 void StereoCombiner::configure_eye_frustums(const Frustum &left_frustum, const Frustum &right_frustum)
 {
        float vertical = max(max(left_frustum.top, -left_frustum.bottom), max(right_frustum.top, -right_frustum.bottom));
 void StereoCombiner::configure_eye_frustums(const Frustum &left_frustum, const Frustum &right_frustum)
 {
        float vertical = max(max(left_frustum.top, -left_frustum.bottom), max(right_frustum.top, -right_frustum.bottom));
index 88f979caeee1c8ce35190cdcf1f7ea186cdb72e7..9dac08c626aa19ce2a04838c12e3347880f752bf 100644 (file)
@@ -42,7 +42,7 @@ protected:
 
        StereoCombiner();
 public:
 
        StereoCombiner();
 public:
-       virtual ~StereoCombiner() { }
+       virtual ~StereoCombiner();
 
 protected:
        void configure_eye_frustums(const Frustum &, const Frustum &);
 
 protected:
        void configure_eye_frustums(const Frustum &, const Frustum &);
index f08cd79ea1ef7166506265ff46dbee457d4df616..868447435c213551f55c412e41ae0450aa88d3e5 100644 (file)
@@ -129,6 +129,11 @@ StereoView::Eye::Eye():
        target(0)
 { }
 
        target(0)
 { }
 
+StereoView::Eye::~Eye()
+{
+       delete target;
+}
+
 void StereoView::Eye::create_target(unsigned w, unsigned h)
 {
        delete target;
 void StereoView::Eye::create_target(unsigned w, unsigned h)
 {
        delete target;
index e31fa3d561b9adaa51f81a916b30d5c66f3483e5..75361ba13abd56acf8cc50feb0585e75daa41f24 100644 (file)
@@ -42,6 +42,7 @@ private:
                RenderTarget *target;
 
                Eye();
                RenderTarget *target;
 
                Eye();
+               ~Eye();
 
                void create_target(unsigned, unsigned);
                void setup_frame(const GL::Camera &, float, const EyeParams &) const;
 
                void create_target(unsigned, unsigned);
                void setup_frame(const GL::Camera &, float, const EyeParams &) const;