Difference between revisions of "Cpp Coding Standards/STL/EraseMem"
From Apache OpenOffice Wiki
< Cpp Coding Standards | STL
m |
B michaelsen (Talk | contribs) |
||
Line 2: | Line 2: | ||
container<T>().swap(myContainer); | container<T>().swap(myContainer); | ||
+ | [[Category:Coding Standards]] |
Latest revision as of 17:14, 14 December 2009
Use this idiom to actually release all memory claimed by an STL container:
container<T>().swap(myContainer);