diff --git a/cvbase.h b/cvbase.h index ac1ded7..8c528b4 100644 --- a/cvbase.h +++ b/cvbase.h @@ -25,11 +25,6 @@ public: bool find(const char *name) const; - void stop() - { - close(); - } - void set_name(const char *name) { m_config_name = name; diff --git a/cvin.cpp b/cvin.cpp index bf4caad..18300ab 100644 --- a/cvin.cpp +++ b/cvin.cpp @@ -119,3 +119,13 @@ void CVIn::start() m_it_begin = it_begin; m_ready = true; } + +void CVIn::stop() +{ + if (m_mapping_list.size() == 0) return; + + close(); + + delete [] m_ports; + delete [] m_buffers; +} diff --git a/cvin.h b/cvin.h index 013bf60..bc9c8f9 100644 --- a/cvin.h +++ b/cvin.h @@ -13,6 +13,7 @@ private: public: void start(); + void stop(); }; #endif // CVIN_H diff --git a/cvout.cpp b/cvout.cpp index a704c14..91fce03 100644 --- a/cvout.cpp +++ b/cvout.cpp @@ -145,3 +145,13 @@ void CVOut::start() m_it_begin = it_begin; m_ready = true; } + +void CVOut::stop() +{ + if (m_mapping_list.size() == 0) return; + + close(); + + delete [] m_ports; + delete [] m_buffers; +} diff --git a/cvout.h b/cvout.h index 9b41e2e..ac527af 100644 --- a/cvout.h +++ b/cvout.h @@ -19,6 +19,7 @@ private: public: void start(); + void stop(); }; #endif // CVOUT_H