C++ (Qt)CModbusInterface::CModbusInterface(...) {... // modbusDevice = new QModbusRtuClient(this);...} CModbusInterface::~CModbusInterface(){ if (modbusDevice) { modbusDevice->deleteLater(); }}
QModbusRtuClient::~QModbusRtuClient( void ){ printf("~QModbusRtuClient %p\n", this);}