diff options
author | David Robillard <d@drobilla.net> | 2012-05-18 18:03:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-18 18:03:24 +0000 |
commit | ec4fd6dd3809a055b66c28f841df277e4cd9f62e (patch) | |
tree | 229dbb5f8046753c433853c890c32b1fdac97a48 /ingen/shared | |
parent | da03dbe262f38fa0cc5eaacd176a4d8efe5029db (diff) | |
download | ingen-ec4fd6dd3809a055b66c28f841df277e4cd9f62e.tar.gz ingen-ec4fd6dd3809a055b66c28f841df277e4cd9f62e.tar.bz2 ingen-ec4fd6dd3809a055b66c28f841df277e4cd9f62e.zip |
Beginnings of a test framework.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4427 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen/shared')
-rw-r--r-- | ingen/shared/Module.hpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/ingen/shared/Module.hpp b/ingen/shared/Module.hpp index 1552a225..81179426 100644 --- a/ingen/shared/Module.hpp +++ b/ingen/shared/Module.hpp @@ -19,8 +19,6 @@ #include <glibmm/module.h> -#include "raul/SharedPtr.hpp" - namespace Ingen { namespace Shared { @@ -32,12 +30,23 @@ class World; * @ingroup IngenShared */ struct Module { - virtual ~Module(); + Module() : library(NULL) {} + virtual ~Module() {} virtual void load(Ingen::Shared::World* world) = 0; virtual void run(Ingen::Shared::World* world) {} - SharedPtr<Glib::Module> library; + /** Library implementing this module. + * + * This is managed by the World and not this class, since closing the library + * in this destructor could possibly reference code from the library + * afterwards and cause a segfault on exit. + */ + Glib::Module* library; + +private: + Module(const Module& noncopyable); + Module& operator=(const Module& noncopyable); }; } // namespace Shared |