diff --git a/SpeckleConnector/Connector/Environment/ConnectorProject.cpp b/SpeckleConnector/Connector/Environment/ConnectorProject.cpp index 4e2b77b..c639094 100644 --- a/SpeckleConnector/Connector/Environment/ConnectorProject.cpp +++ b/SpeckleConnector/Connector/Environment/ConnectorProject.cpp @@ -3,6 +3,7 @@ #include "Connector/Connector.h" #include "Connector/Database/ModelCardDatabase.h" +using namespace active::event; using namespace connector::database; using namespace connector::environment; using namespace speckle::utility; @@ -11,7 +12,8 @@ using namespace speckle::utility; Default constructor --------------------------------------------------------------------*/ ConnectorProject::ConnectorProject() { - m_modelCards = std::make_unique(); + m_modelCards = std::make_shared(); + connector()->addWeak(m_modelCards->getSubscription()); } diff --git a/SpeckleConnector/Connector/Environment/ConnectorProject.h b/SpeckleConnector/Connector/Environment/ConnectorProject.h index 38ebd31..4aa2ff0 100644 --- a/SpeckleConnector/Connector/Environment/ConnectorProject.h +++ b/SpeckleConnector/Connector/Environment/ConnectorProject.h @@ -45,7 +45,7 @@ namespace connector::environment { private: ///The model card database - std::unique_ptr m_modelCards; + std::shared_ptr m_modelCards; }; }