List在遍历中需要注意:
*iter 指向的是 Bullet*, 用erase 之后需要赋给iter,否则会出现 vector iterators incompatible错误
for(std::list<Bullet*>::iterator iter = m_list.begin(); ;) { if(!(*iter)->IsOutSides()) { (*iter)->Render(); iter++; } else { iter = m_list.erase(iter); } if(m_list.size() <= 0 || iter == m_list.end()) break; }