From a6fb6a0289ea47692d87f3e0200532a426f8e60d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 28 Jul 2008 21:56:03 +0000 Subject: 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 --- src/libs/gui/App.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/libs/gui/App.hpp') diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp index 6bb7083b..44878925 100644 --- a/src/libs/gui/App.hpp +++ b/src/libs/gui/App.hpp @@ -28,6 +28,7 @@ #include #include #include +#include using namespace std; @@ -83,9 +84,7 @@ public: void error_message(const string& msg); - void attach(SharedPtr engine, - SharedPtr client); - + void attach(SharedPtr client); void detach(); bool gtk_main_iteration(); @@ -102,7 +101,7 @@ public: Glib::RefPtr icon_from_path(const string& path, int size); - const SharedPtr& engine() const { return _engine; } + const SharedPtr engine() const { return _world->engine; } const SharedPtr& client() const { return _client; } const SharedPtr& store() const { return _store; } const SharedPtr& loader() const { return _loader; } @@ -112,10 +111,7 @@ public: static inline App& instance() { assert(_instance); return *_instance; } - static void run(int argc, char** argv, - Ingen::Shared::World* world, - SharedPtr engine, - SharedPtr interface); + static void run(int argc, char** argv, Ingen::Shared::World* world); Ingen::Shared::World* world() { return _world; } @@ -144,7 +140,6 @@ protected: SharedPtr _serialisation_module; - SharedPtr _engine; SharedPtr _client; SharedPtr _store; SharedPtr _loader; -- cgit v1.2.1