id summary reporter owner description type status priority milestone component version resolution keywords cc 18 Minor memory leak in both encoder and decoder in TMuC 0.5 li@… fbossen "When QC_MDDT is defined, the following variables allocated in source\Lib\TLibCommon\TComRom.cpp are not freed in the decoder. Some of them are not freed in the encoder. UInt *scanOrder4x4[9]; UInt *scanOrder4x4X[9]; UInt *scanOrder4x4Y[9]; UInt *scanOrder8x8[9]; UInt *scanOrder8x8X[9]; UInt *scanOrder8x8Y[9]; UInt *scanStats4x4[9]; UInt *scanStats8x8[9]; UInt *scanOrder16x16[NUM_SCANS_16x16]; UInt *scanOrder16x16X[NUM_SCANS_16x16]; UInt *scanOrder16x16Y[NUM_SCANS_16x16]; UInt *scanStats16x16[NUM_SCANS_16x16]; UInt *scanOrder32x32[NUM_SCANS_32x32]; UInt *scanOrder32x32X[NUM_SCANS_32x32]; UInt *scanOrder32x32Y[NUM_SCANS_32x32]; UInt *scanStats32x32[NUM_SCANS_32x32]; UInt *scanOrder64x64[NUM_SCANS_64x64]; UInt *scanOrder64x64X[NUM_SCANS_64x64]; UInt *scanOrder64x64Y[NUM_SCANS_64x64]; UInt *scanStats64x64[NUM_SCANS_64x64]; In TMuC 0.5 encoder, some of these variables are released in Void TAppEncTop::encode(). I think we'd better release them in Void destroyROM() (TComRom.cpp). Otherwise, we have to keep duplicate code in both encoder and decoder. To fix this problem, maybe we can put the following code at the end of Void destroyROM() and remove the related code in Void TAppEncTop::encode(). #if QC_MDDT //ADAPTIVE_SCAN int ipredmode; for(ipredmode=0; ipredmode<9; ipredmode++) { delete scanOrder4x4[ipredmode]; delete scanOrder4x4X[ipredmode]; delete scanOrder4x4Y[ipredmode]; delete scanOrder8x8[ipredmode]; delete scanOrder8x8X[ipredmode]; delete scanOrder8x8Y[ipredmode]; delete scanStats4x4[ipredmode]; delete scanStats8x8[ipredmode]; } // 16x16 for (int z=0; z < NUM_SCANS_16x16; z++) { delete scanOrder16x16[z]; delete scanOrder16x16X[z]; delete scanOrder16x16Y[z]; delete scanStats16x16[z]; } // 32x32 for (int z=0; z < NUM_SCANS_32x32; z++) { delete scanOrder32x32[z]; delete scanOrder32x32X[z]; delete scanOrder32x32Y[z]; delete scanStats32x32[z]; } // 64x64 for (int z=0; z < NUM_SCANS_64x64; z++) { delete scanOrder64x64[z]; delete scanOrder64x64X[z]; delete scanOrder64x64Y[z]; delete scanStats64x64[z]; } #endif " defect closed minor HM fixed fbossen ksuehring davidf jct-vc@…