Make senseApiLibs a vector<sh_ptr>; getters return sh_ptr

Proper reference and object lifetime management.
This commit is contained in:
2025-08-29 13:19:33 -04:00
parent e024ccdf95
commit b9ca38bff1
2 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -23,9 +23,9 @@ public:
}
SenseApiLib& loadSenseApiLib(const std::string& libraryPath);
std::optional<std::reference_wrapper<SenseApiLib>> getSenseApiLib(
std::optional<std::shared_ptr<SenseApiLib>> getSenseApiLib(
const std::string& libraryPath);
std::optional<std::reference_wrapper<SenseApiLib>> getSenseApiLibByApiName(
std::optional<std::shared_ptr<SenseApiLib>> getSenseApiLibByApiName(
const std::string& apiName);
void unloadSenseApiLib(const std::string& libraryPath);
@@ -53,7 +53,7 @@ private:
SenseApiManager(const SenseApiManager&) = delete;
SenseApiManager& operator=(const SenseApiManager&) = delete;
std::vector<std::unique_ptr<SenseApiLib>> senseApiLibs;
std::vector<std::shared_ptr<SenseApiLib>> senseApiLibs;
public:
static std::optional<std::string> searchForLibInSmoSearchPaths(