Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » [SOLVED] Vector Bug
Re: Vector Bug [message #52567 is a reply to message #52565] Tue, 22 October 2019 14:06 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Vector, when it reallocates memory, it invalidates references.

https://www.ultimatepp.org/srcdoc$Core$Caveats_en-us.html

I don't think there is a workaround for this and you are not supposed to long term store references gotten from vector, just store them for a short amount of processing, until the next operation on Vector.

I believe if you need to store references the correct way is to use Array.
 
Read Message
Read Message
Read Message
Previous Topic: S_type and ValueMap
Next Topic: How to serialize a new data type
Goto Forum:
  


Current Time: Fri May 17 11:42:18 CEST 2024

Total time taken to generate the page: 0.00748 seconds