
14 May
2008
14 May
'08
2:16 p.m.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 14 May 2008 10:03 am, Igor R. wrote:
The problem with this code is that you are returning a reference to data that might be immediately invalidated. A push_back via another thread can cause the referenced memory to no longer be valid.
Does push_back() really invalidate iterators to *previous* vector elements?!
It can, if it causes the vector to reallocate memory. - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIKvQv5vihyNWuA4URAiFnAKDVpSdlLmqGSCuxOPH4WitCpgiPNQCcCfC3 TkZFyiDH5n10xeZrF6soptc= =hxAV -----END PGP SIGNATURE-----