summaryrefslogtreecommitdiffstats
path: root/src/libs/module
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-07-28 21:56:03 +0000
committerDavid Robillard <d@drobilla.net>2008-07-28 21:56:03 +0000
commita6fb6a0289ea47692d87f3e0200532a426f8e60d (patch)
tree0e497255eb8a263ff9cca87b2ed125b71144cacb /src/libs/module
parent8e2ba26101828dcf310e0a43ace7aa68dafd3b16 (diff)
downloadingen-a6fb6a0289ea47692d87f3e0200532a426f8e60d.tar.gz
ingen-a6fb6a0289ea47692d87f3e0200532a426f8e60d.tar.bz2
ingen-a6fb6a0289ea47692d87f3e0200532a426f8e60d.zip
Simply global memory management crap by using shared_ptr in the World struct (it's not C anyway, might as well).
Properly support LV2 events from plugin UIs over OSC and directly (w/ monolithic UI/engine). Fix crashes on node destruction with monolithic UI/engine. Resolves ticket #177. git-svn-id: http://svn.drobilla.net/lad/ingen@1293 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/module')
-rw-r--r--src/libs/module/World.hpp5
-rw-r--r--src/libs/module/global.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libs/module/World.hpp b/src/libs/module/World.hpp
index a1ca9a68..29434069 100644
--- a/src/libs/module/World.hpp
+++ b/src/libs/module/World.hpp
@@ -57,9 +57,8 @@ struct World {
Redland::World* rdf_world;
- EngineInterface* engine;
-
- Engine* local_engine;
+ SharedPtr<EngineInterface> engine;
+ SharedPtr<Engine> local_engine;
};
diff --git a/src/libs/module/global.cpp b/src/libs/module/global.cpp
index 21c36575..a8a2720d 100644
--- a/src/libs/module/global.cpp
+++ b/src/libs/module/global.cpp
@@ -50,8 +50,8 @@ get_world()
world->lv2_features = new LV2Features();
slv2_world_load_all(world->slv2_world);
#endif
- world->engine = NULL;
- world->local_engine = NULL;
+ world->engine.reset();
+ world->local_engine.reset();
}
return world;