1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 10:08:00 +02:00

When resizing, insured we didn't release old memory until after insert

This commit is contained in:
Brian Fiete 2020-05-11 10:17:45 -07:00
parent 40fe76d903
commit a30ad3d9d2
4 changed files with 212 additions and 139 deletions

View file

@ -183,7 +183,7 @@ namespace BeefPerf
if (mStreamDataList.Capacity == 0)
mStreamDataList.Capacity = srcStreamDataList.Count;
else
mStreamDataList.EnsureCapacity(srcStreamDataList.Count);
mStreamDataList.EnsureCapacity(srcStreamDataList.Count, true);
mStreamDataList.GrowUnitialized(idx - (int32)mStreamDataList.Count + 1);
}