This is an automated email from the ASF dual-hosted git repository. martinzink pushed a commit to branch controller_c_api_requirements in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 548325da6809f722520528ae30958360e4c2eeb2 Author: Adam Debreceni <[email protected]> AuthorDate: Wed Mar 11 13:37:42 2026 +0100 MINIFICPP-2715 - Rebase fix --- libminifi/src/core/extension/Extension.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libminifi/src/core/extension/Extension.cpp b/libminifi/src/core/extension/Extension.cpp index 9382da9d1..f8ca0f5f0 100644 --- a/libminifi/src/core/extension/Extension.cpp +++ b/libminifi/src/core/extension/Extension.cpp @@ -118,6 +118,8 @@ Extension::~Extension() { } unload(); + const std::string bundle_name = info_ ? info_->name : library_name_; + // Check if library was truly unloaded and clear class descriptions if it was. // On Linux/GCC, STB_GNU_UNIQUE symbols can prevent dlclose from actually unloading the library. // Some libraries could prevent unloading like RocksDB where Env::Default() creates a global singleton where background threads hold references which prevents unloading @@ -127,12 +129,12 @@ Extension::~Extension() { // Keep class descriptions if library is still in memory dlclose(check); } else { - ClassDescriptionRegistry::clearClassDescriptionsForBundle(name_); + ClassDescriptionRegistry::clearClassDescriptionsForBundle(bundle_name); } #else - HMODULE handle = GetModuleHandleA(name_.c_str()); + HMODULE handle = GetModuleHandleA(library_name_.c_str()); if (handle == nullptr) { - ClassDescriptionRegistry::clearClassDescriptionsForBundle(name_); + ClassDescriptionRegistry::clearClassDescriptionsForBundle(bundle_name); } #endif }
