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 #52571 is a reply to message #52567] Tue, 22 October 2019 14:52 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
cbpporter wrote on Tue, 22 October 2019 14:06
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.




Ahhhhhh ! seems logique thanks
 
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: Sun Apr 27 10:50:36 CEST 2025

Total time taken to generate the page: 0.00896 seconds