Fixed a bug in msgPrintControl

This commit is contained in:
2025-03-19 15:01:20 +01:00
parent f26d1bb612
commit 828e9bc59c
3 changed files with 25 additions and 6 deletions

View File

@@ -274,9 +274,15 @@ sinqController::sinqController(const char *portName,
}
sinqController::~sinqController(void) {
/*
Cleanup of the memory allocated in the asynMotorController constructor
*/
// Free all axes
for (int axisNo = 0; axisNo < numAxes_; axisNo++) {
if (pAxes_[axisNo] != nullptr) {
delete pAxes_[axisNo];
}
}
// Cleanup of the array allocated in the asynMotorController constructor
free(this->pAxes_);
}