Skip to content

Commit

Permalink
datalogger: cleanup monitor list and loose objects on disconnect.
Browse files Browse the repository at this point in the history
Signed-off-by: AlexandraTrifan <[email protected]>
  • Loading branch information
AlexandraTrifan authored and adisuciu committed Sep 19, 2024
1 parent 7e0bc94 commit 5a16a38
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/datalogger/src/dataloggerplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ bool DataLoggerPlugin::onConnect()

bool DataLoggerPlugin::onDisconnect()
{
auto count = dmmList.count();
for(int i = 0; i < count; i++) {
delete dmmList.takeLast();
}

if(m_dataAcquisitionManager) {
delete m_dataAcquisitionManager;
m_dataAcquisitionManager = nullptr;
}

ConnectionProvider *cp = ConnectionProvider::GetInstance();
cp->close(m_param);

Expand Down

0 comments on commit 5a16a38

Please sign in to comment.