Boost logo

Boost Users :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-05-14 10:16:14


-----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-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net