summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/plugin-support.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-19 06:32:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-19 06:32:03 +0200
commit0ede2311faefd5bc8a52dda33d866bd9f3db7428 (patch)
tree4af85bf9f85a13c7907074f5c15ca02bf9d3d6cf /facetracknoir/plugin-support.h
parentcd8c47dc628016d470268bbed3c29461ffed296d (diff)
reduce leakage somewhat by using shared_ptr
Found-by: valgrind
Diffstat (limited to 'facetracknoir/plugin-support.h')
-rw-r--r--facetracknoir/plugin-support.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/facetracknoir/plugin-support.h b/facetracknoir/plugin-support.h
index b539d152..7f8e3c28 100644
--- a/facetracknoir/plugin-support.h
+++ b/facetracknoir/plugin-support.h
@@ -8,6 +8,9 @@
#include <QLibrary>
#include <QFrame>
+#include <memory>
+template<typename t> using ptr = std::shared_ptr<t>;
+
class IDynamicLibraryProvider;
struct SelectedLibraries {
@@ -48,8 +51,8 @@ private:
// XXX TODO it can die if running tracker state separated into class -sh 20141004
class IDynamicLibraryProvider {
public:
- virtual DynamicLibrary* current_tracker1() = 0;
- virtual DynamicLibrary* current_protocol() = 0;
- virtual DynamicLibrary* current_filter() = 0;
+ virtual ptr<DynamicLibrary> current_tracker1() = 0;
+ virtual ptr<DynamicLibrary> current_protocol() = 0;
+ virtual ptr<DynamicLibrary> current_filter() = 0;
virtual QFrame* get_video_widget() = 0;
};