From 3a6ce38e32f023300d5ff52a2925553083e9598e Mon Sep 17 00:00:00 2001 From: Giacomo Dabisias Date: Wed, 21 Oct 2015 13:47:04 +0200 Subject: [PATCH] removes unused memory allocation in the registration --- src/registration.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/registration.cpp b/src/registration.cpp index 7e4175456..79b4b8771 100644 --- a/src/registration.cpp +++ b/src/registration.cpp @@ -136,7 +136,7 @@ void Registration::apply(const Frame *rgb, const Frame *depth, Frame *undistorte float *p_filter_map = NULL; // map for storing the color offset for each depth pixel - int *depth_to_c_off = new int[size_depth]; + int depth_to_c_off[size_depth]; int *map_c_off = depth_to_c_off; // initializing the depth_map with values outside of the Kinect2 range @@ -247,7 +247,6 @@ void Registration::apply(const Frame *rgb, const Frame *depth, Frame *undistorte *registered_data = c_off < 0 ? 0 : *(rgb_data + c_off); } } - delete[] depth_to_c_off; } /**