修复BasePresenter释放点云时存在有内存未释放
This commit is contained in:
parent
eb1f09d6d4
commit
0ce34e3937
@ -5,7 +5,7 @@
|
|||||||
#define HOLEDETECTION_APP_NAME "孔洞检测"
|
#define HOLEDETECTION_APP_NAME "孔洞检测"
|
||||||
|
|
||||||
// 版本字符串
|
// 版本字符串
|
||||||
#define HOLEDETECTION_VERSION_STRING "1.1.3"
|
#define HOLEDETECTION_VERSION_STRING "1.1.4"
|
||||||
#define HOLEDETECTION_BUILD_STRING "1"
|
#define HOLEDETECTION_BUILD_STRING "1"
|
||||||
#define HOLEDETECTION_FULL_VERSION_STRING "V" HOLEDETECTION_VERSION_STRING "_" HOLEDETECTION_BUILD_STRING
|
#define HOLEDETECTION_FULL_VERSION_STRING "V" HOLEDETECTION_VERSION_STRING "_" HOLEDETECTION_BUILD_STRING
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
|
# 1.1.4 2026-04-05
|
||||||
|
## build_1
|
||||||
|
1. 修复 释放点云内存的问题
|
||||||
|
|
||||||
|
|
||||||
# 1.1.3 2026-04-05
|
# 1.1.3 2026-04-05
|
||||||
## build_1
|
## build_1
|
||||||
1. 更新算法 1.0.1
|
1. 更新算法 1.0.1
|
||||||
|
|
||||||
|
|
||||||
# 1.1.2 2026-04-02
|
# 1.1.2 2026-04-02
|
||||||
## build_1
|
## build_1
|
||||||
1. 更新算法
|
1. 更新算法
|
||||||
|
|||||||
@ -39,6 +39,9 @@ BasePresenter::~BasePresenter()
|
|||||||
// 停止检测线程
|
// 停止检测线程
|
||||||
StopAlgoDetectThread();
|
StopAlgoDetectThread();
|
||||||
|
|
||||||
|
// 释放检测数据缓存中的动态内存
|
||||||
|
ClearDetectionDataCache();
|
||||||
|
|
||||||
// 停止重连定时器
|
// 停止重连定时器
|
||||||
StopCameraReconnectTimer();
|
StopCameraReconnectTimer();
|
||||||
|
|
||||||
@ -576,6 +579,25 @@ void BasePresenter::StopAlgoDetectThread()
|
|||||||
void BasePresenter::ClearDetectionDataCache()
|
void BasePresenter::ClearDetectionDataCache()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(m_detectionDataMutex);
|
std::lock_guard<std::mutex> lock(m_detectionDataMutex);
|
||||||
|
|
||||||
|
// 释放每个 SVzLaserLineData 中动态分配的 p3DPoint 和 p2DPoint
|
||||||
|
// (_StaticDetectionCallback 中通过 new[] 分配,此处必须 delete[])
|
||||||
|
for (auto& pair : m_detectionDataCache) {
|
||||||
|
EVzResultDataType dataType = pair.first;
|
||||||
|
SVzLaserLineData& lineData = pair.second;
|
||||||
|
|
||||||
|
if (dataType == keResultDataType_Position) {
|
||||||
|
delete[] static_cast<SVzNL3DPosition*>(lineData.p3DPoint);
|
||||||
|
delete[] static_cast<SVzNL2DPosition*>(lineData.p2DPoint);
|
||||||
|
} else if (dataType == keResultDataType_PointXYZRGBA) {
|
||||||
|
delete[] static_cast<SVzNLPointXYZRGBA*>(lineData.p3DPoint);
|
||||||
|
delete[] static_cast<SVzNL2DLRPoint*>(lineData.p2DPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
lineData.p3DPoint = nullptr;
|
||||||
|
lineData.p2DPoint = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
m_detectionDataCache.clear();
|
m_detectionDataCache.clear();
|
||||||
LOG_DEBUG("[BasePresenter] 检测数据缓存已清空\n");
|
LOG_DEBUG("[BasePresenter] 检测数据缓存已清空\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,22 +2,21 @@
|
|||||||
|
|
||||||
## 软件对应关系表
|
## 软件对应关系表
|
||||||
|
|
||||||
| 项目名称 | App名称 | 版本 |
|
| 序号 | 项目名称 | App名称 | 版本 |
|
||||||
|:--------|:---------|:------------|
|
|:---:|:--------|:---------|:------------|
|
||||||
| 自动拆包 | GrabBag | 1.3.6.2 |
|
| 1 | 自动拆包 | GrabBag | 1.3.6.2 |
|
||||||
| 皮带撕裂 | BeltTearingServer | 2.0.8.1 |
|
| 2 | 皮带撕裂 | BeltTearingServer | 2.0.8.1 |
|
||||||
| 焊接 | LapWeld | 1.0.0.1 |
|
| 3 | 孔洞检测 | HoleDetection | 1.1.3.1 |
|
||||||
| 工件定位 | Workpiece | 1.0.3.0 |
|
| 4 | 棒材定位 | RodAndBarPosition | 1.0.2.1 |
|
||||||
| 颗粒尺寸检测 | ParticleSize | 1.0.0.0 |
|
| 5 | 车轮拱高测量 | WheelMeasure | 1.0.2.1 |
|
||||||
| 双目标记检测 | BinocularMarkServer | 1.0.0.4 |
|
| 6 | 定子定位 | StatorPosition | 1.0.0.1 |
|
||||||
| 工件项目 | WorkpieceProject | 无 |
|
| 7 | 焊接 | LapWeld | 1.0.0.1 |
|
||||||
| 铁路隧道槽道测量 | TunnelChannel | 1.0.0.3 |
|
| 8 | 工件定位 | Workpiece | 1.0.3.0 |
|
||||||
| 车轮拱高测量 | WheelMeasure | 1.0.2.1 |
|
| 9 | 颗粒尺寸检测 | ParticleSize | 1.0.0.0 |
|
||||||
| 螺杆定位 | ScrewPosition | 1.0.0.1 |
|
| 10 | 双目标记检测 | BinocularMarkServer | 1.0.0.4 |
|
||||||
| 包裹拆线位置定位 | BagThreadPosition | 1.0.0.4 |
|
| 11 | 铁路隧道槽道测量 | TunnelChannel | 1.0.0.3 |
|
||||||
| 工件孔定位 | WorkpieceHole | 1.0.3.0 |
|
| 12 | 螺杆定位 | ScrewPosition | 1.0.0.1 |
|
||||||
| 定子定位 | StatorPosition | 1.0.0.1 |
|
| 13 | 包裹拆线位置定位 | BagThreadPosition | 1.0.0.4 |
|
||||||
| 孔洞检测 | HoleDetection | 1.1.3.1 |
|
| 14 | 工件孔定位 | WorkpieceHole | 1.0.3.0 |
|
||||||
| 坑孔定位 | HolePitPosition | 无 |
|
| 16 | 坑孔定位 | HolePitPosition | 无 |
|
||||||
| 棒材定位 | RodAndBarPosition | 1.0.2.1 |
|
|
||||||
|
|
||||||
|
|||||||
2
Utils
2
Utils
@ -1 +1 @@
|
|||||||
Subproject commit 5e978eaea4f7891cc2f4a9ac871598cbb3178f50
|
Subproject commit c98aa7b5d6729922879e95f6c1403ae7405136ba
|
||||||
Loading…
x
Reference in New Issue
Block a user