summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-13 07:46:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-13 07:46:12 +0100
commit8451b16e88b25405d9877243b253a369fd953243 (patch)
treed3cea9c9681e82a62a060ab05553ef05d80c9c24 /tracker-pt/camera.cpp
parent53e8b2d41988be69deb800e1ef3cbcfc699a3076 (diff)
tracker/pt: workaround unexplained leak
Somehow, using unique_ptr causes a leak at destruct time. The stored pointer isn't freed. It works perfectly fine with shared_ptr. It seems I'm doing things correctly with a move constructor for unique_ptr in the Tracker_PT class, as well as the pointer initialization ctor in `module.cpp'. Who the hell knows what's happening behind the scenes.
Diffstat (limited to 'tracker-pt/camera.cpp')
-rw-r--r--tracker-pt/camera.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp
index 20acf27a..ba4583da 100644
--- a/tracker-pt/camera.cpp
+++ b/tracker-pt/camera.cpp
@@ -18,7 +18,9 @@
using namespace pt_module;
-Camera::Camera(const QString& module_name) : dt_mean(0), fov(0), s(module_name) {}
+Camera::Camera(const QString& module_name) : s { module_name }
+{
+}
QString Camera::get_desired_name() const
{