File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -159,19 +159,23 @@ const float* DumpDepthPacketProcessor::getZTable() { return ztable_; }
159159const short * DumpDepthPacketProcessor::getLookupTable () { return lut_; }
160160
161161void DumpDepthPacketProcessor::loadP0TablesFromCommandResponse (unsigned char * buffer, size_t buffer_length) {
162+ delete[] p0table_;
162163 p0table_ = new unsigned char [buffer_length];
163164 std::memcpy (p0table_, buffer, buffer_length);
164165}
165166
166167void DumpDepthPacketProcessor::loadXZTables (const float *xtable, const float *ztable) {
168+ delete[] xtable_;
167169 xtable_ = new float [TABLE_SIZE];
168170 std::memcpy (xtable_, xtable, TABLE_SIZE * sizeof (float ));
169171
172+ delete[] ztable_;
170173 ztable_ = new float [TABLE_SIZE];
171174 std::memcpy (ztable_, ztable, TABLE_SIZE * sizeof (float ));
172175}
173176
174177void DumpDepthPacketProcessor::loadLookupTable (const short *lut) {
178+ delete[] lut_;
175179 lut_ = new short [LUT_SIZE];
176180 std::memcpy (lut_, lut, LUT_SIZE * sizeof (short ));
177181}
You can’t perform that action at this time.
0 commit comments