From 1e3758b0e4df20bb9eb5c7c119e75e2d03e9a223 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 14 Mar 2025 22:21:04 -0500 Subject: [PATCH] debug unload --- modules/print/src/print.cpp | 2 +- src/App.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/print/src/print.cpp b/modules/print/src/print.cpp index eff9f68..971ee16 100644 --- a/modules/print/src/print.cpp +++ b/modules/print/src/print.cpp @@ -12,5 +12,5 @@ void Print::run() { std::cout << "Print lib loaded and run!\n"; app.unload(self); //app.end(); - std::cout << "App::Get() called\n"; + std::cout << "app.unload() called\n"; } diff --git a/src/App.cpp b/src/App.cpp index 35a255b..e26a461 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -76,9 +76,13 @@ void App::load(std::string lib) { void App::unload(decltype(Module::self) it) { void* handle = (*it)->getHandle(); + std::cout << "retrieved handle\nAttempting to delete module: " << (*it)->getName() << std::endl; delete *it; + std::cout << "deleted module\n"; dlclose(handle); + std::cout << "closed handle\n"; modules.erase(it); + std::cout << "erased iterator\n"; } void App::handleArgs(const int& argc, char* argv[]) {