From ba2bc099de05fdf664f0d2d8f0e7c52b74dd8638 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 13 Jan 2022 17:31:06 -0500 Subject: [PATCH] Log initializing, creating, deleting, and destroying subsystems. --- adapters/standalone.cpp | 26 ++++++++++++++++++++++---- src/context.cpp | 6 ++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/adapters/standalone.cpp b/adapters/standalone.cpp index 12cbfeb3..620ca770 100644 --- a/adapters/standalone.cpp +++ b/adapters/standalone.cpp @@ -172,33 +172,45 @@ int main(int argc, char* argv[]) { exit(1); } - INFO("Initializing environment"); + INFO("Initializing network"); network::init(); + INFO("Initializing audio"); audio::init(); rtaudioInit(); + INFO("Initializing MIDI"); midi::init(); rtmidiInit(); keyboard::init(); gamepad::init(); + INFO("Initializing plugins"); plugin::init(); + INFO("Initializing browser"); app::browserInit(); + INFO("Initializing library"); library::init(); discord::init(); if (!settings::headless) { + INFO("Initializing UI"); ui::init(); + INFO("Initializing window"); window::init(); } // Initialize context - INFO("Initializing context"); contextSet(new Context); + INFO("Creating engine"); APP->engine = new engine::Engine; + INFO("Creating history state"); APP->history = new history::State; + INFO("Creating event state"); APP->event = new widget::EventState; + INFO("Creating scene"); APP->scene = new app::Scene; APP->event->rootWidget = APP->scene; + INFO("Creating patch manager"); APP->patch = new patch::Manager; if (!settings::headless) { + INFO("Creating window"); APP->window = new window::Window; } @@ -246,7 +258,7 @@ int main(int argc, char* argv[]) { } // Destroy context - INFO("Destroying context"); + INFO("Deleting context"); delete APP; contextSet(NULL); if (!settings::headless) { @@ -254,16 +266,22 @@ int main(int argc, char* argv[]) { } // Destroy environment - INFO("Destroying environment"); if (!settings::headless) { + INFO("Destroying window"); window::destroy(); + INFO("Destroying UI"); ui::destroy(); } discord::destroy(); + INFO("Destroying library"); library::destroy(); + INFO("Destroying MIDI"); midi::destroy(); + INFO("Destroying audio"); audio::destroy(); + INFO("Destroying plugins"); plugin::destroy(); + INFO("Destroying network"); network::destroy(); INFO("Destroying logger"); logger::destroy(); diff --git a/src/context.cpp b/src/context.cpp index c0ef6d47..95343c02 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -15,21 +15,27 @@ Context::~Context() { // Set pointers to NULL so other objects will segfault when attempting to access them + INFO("Deleting window"); delete window; window = NULL; + INFO("Deleting patch manager"); delete patch; patch = NULL; + INFO("Deleting scene"); delete scene; scene = NULL; + INFO("Deleting event state"); delete event; event = NULL; + INFO("Deleting history state"); delete history; history = NULL; + INFO("Deleting engine"); delete engine; engine = NULL; }