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/progs/ingen/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/progs') diff --git a/src/progs/ingen/main.cpp b/src/progs/ingen/main.cpp index cf526da5..64cfd36b 100644 --- a/src/progs/ingen/main.cpp +++ b/src/progs/ingen/main.cpp @@ -104,7 +104,7 @@ main(int argc, char** argv) Engine* (*new_engine)(Ingen::Shared::World* world) = NULL; if (engine_module->get_symbol("new_engine", (void*&)new_engine)) { engine = SharedPtr(new_engine(world)); - world->local_engine = engine.get(); + world->local_engine = engine; } else { engine_module.reset(); } @@ -152,7 +152,7 @@ main(int argc, char** argv) engine->activate(args.parallelism_arg); } - world->engine = engine_interface.get(); + world->engine = engine_interface; /* Load a patch */ if (args.load_given && engine_interface) { @@ -182,7 +182,7 @@ main(int argc, char** argv) Glib::get_current_dir(), args.load_arg)); } - loader->load(engine_interface, world->rdf_world, uri, parent_path, ""); + loader->load(world, uri, parent_path, ""); } else { cerr << "Unable to load serialisation module, aborting." << endl; @@ -196,12 +196,12 @@ main(int argc, char** argv) bool ran_gui = false; if (args.gui_given) { gui_module = Ingen::Shared::load_module("ingen_gui"); - void (*run)(int, char**, Ingen::Shared::World*, SharedPtr, SharedPtr) = NULL; + void (*run)(int, char**, Ingen::Shared::World*); bool found = gui_module->get_symbol("run", (void*&)run); if (found) { ran_gui = true; - run(argc, argv, world, engine, engine_interface); + run(argc, argv, world); } else { cerr << "Unable to find GUI module, GUI not loaded." << endl; cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl; -- cgit v1.2.1