push_back()/emplace_back() on array invalidates pointers to existing array items #1586
Labels
kind: question
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
I am serializing some internal structures to Json and would like to populate an array with null json values, storing a pointer to each null value and then later filling that value with the appropriate data. Eg:
However, this apparently yields an array where the first two elements are null, and only the last element in the array contains the actual data (an integer == 2).
I am not sure if I am simply using the API incorrectly, or there is an actual issue that needs to be addressed. I would very much appreciate any help, thanks!
The text was updated successfully, but these errors were encountered: