Fix a load of stuff that wasn't being freed on close.
[dcpomatic.git] / src / lib / cinema_sound_processor.h
index ef003da2a3b4834e6c02ae4faf9618df4541c8f9..3ccaa5c9b35c3195603f497bc82f21b1e03c5594 100644 (file)
@@ -29,6 +29,7 @@
 
 
 #include <boost/utility.hpp>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -64,7 +65,6 @@ public:
        static void setup_cinema_sound_processors ();
        static CinemaSoundProcessor const * from_id (std::string id);
        static CinemaSoundProcessor const * from_index (int);
-       static int as_index (CinemaSoundProcessor const *);
 
 private:
        /** id for our use */
@@ -75,8 +75,8 @@ private:
        float _below;
        float _above;
 
-       /** sll available cinema sound processors */
-       static std::vector<CinemaSoundProcessor const *> _cinema_sound_processors;
+       /** all available cinema sound processors */
+       static std::vector<std::unique_ptr<const CinemaSoundProcessor>> _cinema_sound_processors;
 };