What is the correct way to remove/delete items from a valueArray?
I tried using Value::removeMember but that only works for valueObjects. The only other way that I have figured out is to iterate through the map on my own and call erase() on the iterator which seems to cause a memory leak.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So evidently there is no way to do this. You can only add but not delete??? Is that a limitation of the std::map???
I noticed it keeps leaving null s everywhere if you delete an object from the middle of an array. Resize after that just messes the whole thing up. After a while you just get a memory exception crash.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is the correct way to remove/delete items from a valueArray?
I tried using Value::removeMember but that only works for valueObjects. The only other way that I have figured out is to iterate through the map on my own and call erase() on the iterator which seems to cause a memory leak.
So evidently there is no way to do this. You can only add but not delete??? Is that a limitation of the std::map???
I noticed it keeps leaving null s everywhere if you delete an object from the middle of an array. Resize after that just messes the whole thing up. After a while you just get a memory exception crash.