Merge "Fix a memory corruption issue when vector resize"