Cpp Coding Standards/STL/EraseMem

From Apache OpenOffice Wiki
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Use this idiom to actually release all memory claimed by an STL container:

container<T>().swap(myContainer);
Personal tools