Use this idiom to actually release all memory claimed by an STL container:
container<T>().swap(myContainer);