Clean up the old connection when its replaced by a new one

This commit is contained in:
Chris Whiteford
2023-01-22 11:26:00 -05:00
parent ffc9278380
commit 55becb0d58
+2
View File
@@ -69,7 +69,9 @@ void CANConManager::remove(CANConnection* pConn_p)
void CANConManager::replace(int idx, CANConnection* pConn_p)
{
CANConnection *original = mConns[idx];
mConns.replace(idx, pConn_p);
delete original; original = NULL;
}
//Get total number of buses currently registered with the program