From 829fe6c6bc33d53fda9c31fd45a37e1df87befff Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 30 一月 2026 11:16:24 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/CMaster.cpp | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index f51c969..bd2e9ab 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -119,13 +119,6 @@
m_hEventDispatchThreadExit[1] = nullptr;
}
- // 閲婃斁浜哄伐鎼嚭缂撳啿鍖洪噷鐨勭幓鐠�
- for (auto* pGlass : m_bufGlass) {
- if (pGlass != nullptr) {
- pGlass->release();
- }
- }
- m_bufGlass.clear();
DeleteCriticalSection(&m_criticalSection);
}
@@ -344,6 +337,13 @@
}
m_listEquipment.clear();
+ // release manual-remove buffer before glass pool is torn down
+ for (auto* pGlass : m_bufGlass) {
+ if (pGlass != nullptr) {
+ pGlass->release();
+ }
+ }
+ m_bufGlass.clear();
if (m_pCollector != nullptr) {
m_pCollector->stopLoop();
@@ -1930,6 +1930,11 @@
m_listener.onJobReceived(this, (CEquipment*)pEquipment, port, pJobDataS);
}
};
+ listener.onSentOutJob = [&](void* pEquipment, int port, CJobDataS* pJobDataS) {
+ if (m_listener.onJobSentOut != nullptr) {
+ m_listener.onJobSentOut(this, (CEquipment*)pEquipment, port, pJobDataS);
+ }
+ };
pEquipment->setListener(listener);
pEquipment->setCcLink(&m_cclink);
m_listEquipment.push_back(pEquipment);
--
Gitblit v1.9.3