Fix memory leak

This commit is contained in:
RBT22
2024-04-03 13:22:17 +02:00
parent 746c317157
commit a302f4b66a
+4
View File
@@ -836,6 +836,10 @@ void OBCameraNode::publishDepthPointCloud(const std::shared_ptr<ob::FrameSet> &f
RCLCPP_INFO_STREAM(logger_, "Saving point cloud to " << filename);
saveDepthPointsToPly(point_cloud_msg_, filename);
}
delete[] data;
data = nullptr;
delete[] pointcloudData;
pointcloudData = nullptr;
}
void OBCameraNode::publishColoredPointCloud(const std::shared_ptr<ob::FrameSet> &frame_set) {