oryol
oryol copied to clipboard
Container classes: prevent item ref invalidation when adding new items
If an item to be added is a reference to an item in the same container, and the container needs to grow, the item reference will be invalid and a memory corruption might happen. Detect if the container needs to grow, and create a copy of the item before growing.