修复BasePresenter释放点云; 更新了icon
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@ -579,26 +579,8 @@ void BasePresenter::StopAlgoDetectThread()
|
||||
void BasePresenter::ClearDetectionDataCache()
|
||||
{
|
||||
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_dataLoader.FreeLaserScanData(m_detectionDataCache);
|
||||
LOG_DEBUG("[BasePresenter] 检测数据缓存已清空\n");
|
||||
}
|
||||
|
||||
|
||||