diff --git a/App/HoleDetection/HoleDetectionApp/Version.h b/App/HoleDetection/HoleDetectionApp/Version.h index 0f13676..3ae7f3d 100644 --- a/App/HoleDetection/HoleDetectionApp/Version.h +++ b/App/HoleDetection/HoleDetectionApp/Version.h @@ -5,7 +5,7 @@ #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_FULL_VERSION_STRING "V" HOLEDETECTION_VERSION_STRING "_" HOLEDETECTION_BUILD_STRING diff --git a/App/HoleDetection/HoleDetectionApp/Version.md b/App/HoleDetection/HoleDetectionApp/Version.md index 46069e2..071fc4d 100644 --- a/App/HoleDetection/HoleDetectionApp/Version.md +++ b/App/HoleDetection/HoleDetectionApp/Version.md @@ -1,8 +1,12 @@ +# 1.1.4 2026-04-05 +## build_1 +1. 修复 释放点云内存的问题 + + # 1.1.3 2026-04-05 ## build_1 1. 更新算法 1.0.1 - # 1.1.2 2026-04-02 ## build_1 1. 更新算法 diff --git a/AppUtils/AppCommon/Src/BasePresenter.cpp b/AppUtils/AppCommon/Src/BasePresenter.cpp index 5a64a53..92c4c08 100644 --- a/AppUtils/AppCommon/Src/BasePresenter.cpp +++ b/AppUtils/AppCommon/Src/BasePresenter.cpp @@ -39,6 +39,9 @@ BasePresenter::~BasePresenter() // 停止检测线程 StopAlgoDetectThread(); + // 释放检测数据缓存中的动态内存 + ClearDetectionDataCache(); + // 停止重连定时器 StopCameraReconnectTimer(); @@ -576,6 +579,25 @@ void BasePresenter::StopAlgoDetectThread() void BasePresenter::ClearDetectionDataCache() { std::lock_guard 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(lineData.p3DPoint); + delete[] static_cast(lineData.p2DPoint); + } else if (dataType == keResultDataType_PointXYZRGBA) { + delete[] static_cast(lineData.p3DPoint); + delete[] static_cast(lineData.p2DPoint); + } + + lineData.p3DPoint = nullptr; + lineData.p2DPoint = nullptr; + } + m_detectionDataCache.clear(); LOG_DEBUG("[BasePresenter] 检测数据缓存已清空\n"); } diff --git a/GrabBagPrj/AppList.md b/GrabBagPrj/AppList.md index e09a778..6f0faaa 100644 --- a/GrabBagPrj/AppList.md +++ b/GrabBagPrj/AppList.md @@ -2,22 +2,21 @@ ## 软件对应关系表 -| 项目名称 | App名称 | 版本 | -|:--------|:---------|:------------| -| 自动拆包 | GrabBag | 1.3.6.2 | -| 皮带撕裂 | BeltTearingServer | 2.0.8.1 | -| 焊接 | LapWeld | 1.0.0.1 | -| 工件定位 | Workpiece | 1.0.3.0 | -| 颗粒尺寸检测 | ParticleSize | 1.0.0.0 | -| 双目标记检测 | BinocularMarkServer | 1.0.0.4 | -| 工件项目 | WorkpieceProject | 无 | -| 铁路隧道槽道测量 | TunnelChannel | 1.0.0.3 | -| 车轮拱高测量 | WheelMeasure | 1.0.2.1 | -| 螺杆定位 | ScrewPosition | 1.0.0.1 | -| 包裹拆线位置定位 | BagThreadPosition | 1.0.0.4 | -| 工件孔定位 | WorkpieceHole | 1.0.3.0 | -| 定子定位 | StatorPosition | 1.0.0.1 | -| 孔洞检测 | HoleDetection | 1.1.3.1 | -| 坑孔定位 | HolePitPosition | 无 | -| 棒材定位 | RodAndBarPosition | 1.0.2.1 | +| 序号 | 项目名称 | App名称 | 版本 | +|:---:|:--------|:---------|:------------| +| 1 | 自动拆包 | GrabBag | 1.3.6.2 | +| 2 | 皮带撕裂 | BeltTearingServer | 2.0.8.1 | +| 3 | 孔洞检测 | HoleDetection | 1.1.3.1 | +| 4 | 棒材定位 | RodAndBarPosition | 1.0.2.1 | +| 5 | 车轮拱高测量 | WheelMeasure | 1.0.2.1 | +| 6 | 定子定位 | StatorPosition | 1.0.0.1 | +| 7 | 焊接 | LapWeld | 1.0.0.1 | +| 8 | 工件定位 | Workpiece | 1.0.3.0 | +| 9 | 颗粒尺寸检测 | ParticleSize | 1.0.0.0 | +| 10 | 双目标记检测 | BinocularMarkServer | 1.0.0.4 | +| 11 | 铁路隧道槽道测量 | TunnelChannel | 1.0.0.3 | +| 12 | 螺杆定位 | ScrewPosition | 1.0.0.1 | +| 13 | 包裹拆线位置定位 | BagThreadPosition | 1.0.0.4 | +| 14 | 工件孔定位 | WorkpieceHole | 1.0.3.0 | +| 16 | 坑孔定位 | HolePitPosition | 无 | diff --git a/Utils b/Utils index 5e978ea..c98aa7b 160000 --- a/Utils +++ b/Utils @@ -1 +1 @@ -Subproject commit 5e978eaea4f7891cc2f4a9ac871598cbb3178f50 +Subproject commit c98aa7b5d6729922879e95f6c1403ae7405136ba