Make senseApiLibs a vector<sh_ptr>; getters return sh_ptr
Proper reference and object lifetime management.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user