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 committed Sep 18, 2024
1 parent cb1bc40 commit ce5f83e
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 ce5f83e

Please sign in to comment.