1:容器list元素删除,错误的erase()代码会i导致迭代器失效,造成程序挂起。
2:后台服务程序中尽量不要使用vector容器,因为内存空间只增不减,clear()只清空元素,不回收内存空间。
3:STL代码优化
4:STL库是否是线程安全的?
STLPortSimultaneous read access to the same container from within separate threads is safe;
simultaneous access to distinct containers (not shared between threads) is safe;
user must provide synchronization for all accesses if any thread may modify shared container.