Skip to content

Free vector data memory when destroying CodingStructure buffers

Frank Bossen requested to merge bossen/VVCSoftware_VTM:memred2 into master

std::vector<>::clear() sets the vector size to 0 but doesn't release memory that holds data (that happens only when the destructor is called). Calls to clear() are replaced by a call to a function that swaps the vector with an empty temporary one, effectively releasing memory. Preliminary results show a reduction of about 2GB in peak memory usage for RA class A.

Merge request reports