summaryrefslogtreecommitdiff
path: root/kms++util/inc
diff options
context:
space:
mode:
authordreamer.dead <dreamer.dead@gmail.com>2020-07-24 07:20:31 +0000
committerdreamer.dead <dreamer.dead@gmail.com>2020-07-24 07:20:31 +0000
commit85dbfbaedecb46ebd0aa89ffeb674de497555ca9 (patch)
tree3c13af26923c64ea4b9dec87e1dbc93e5b01fd4b /kms++util/inc
parentd9d5e44526a3b8065e4ae913032020d0bfd93103 (diff)
Use unique_ptr to prevent memory leaks in VideoDevice class
Diffstat (limited to 'kms++util/inc')
-rw-r--r--kms++util/inc/kms++util/videodevice.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/kms++util/inc/kms++util/videodevice.h b/kms++util/inc/kms++util/videodevice.h
index e089bcd..0aaa103 100644
--- a/kms++util/inc/kms++util/videodevice.h
+++ b/kms++util/inc/kms++util/videodevice.h
@@ -1,6 +1,7 @@
#pragma once
#include <string>
+#include <memory>
#include <kms++/kms++.h>
class VideoStreamer;
@@ -50,8 +51,8 @@ private:
std::vector<kms::DumbFramebuffer*> m_capture_fbs;
std::vector<kms::DumbFramebuffer*> m_output_fbs;
- VideoStreamer* m_capture_streamer;
- VideoStreamer* m_output_streamer;
+ std::unique_ptr<VideoStreamer> m_capture_streamer;
+ std::unique_ptr<VideoStreamer> m_output_streamer;
};
class VideoStreamer