好久不用C++了,回顾一下
If a vector is altered, such as push_back etc, the former reference to old elements might change:
Block& topBlock = _blocks[_topId];
Block block;
_blocks.push_back(block);
access topBlock //here topBlock might be invalid, so must use _blocks[_topId] instead or refer again