[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] /srv/bzr/gnash/rtmp r9678: Don't use std::swap, it ap
Re: [Gnash-commit] /srv/bzr/gnash/rtmp r9678: Don't use std::swap, it appears to corrupt the data.
Sat, 1 Nov 2008 12:00:47 -0700 (PDT)
Alpine 1.00 (DEB 882 2007-12-20)
What this code used to do was transfer the ownership of the pointer
contained in tmp (i.e., NULL) to _data and vice versa. So after swap(),
_data would contain no data. (Presumably this is the corruption
What the code now does is that _data takes ownership of a newly
allocated buffer, so even if one were to use the temporary scoped_array
called tmp, there would be little point to it.
On Sat, 1 Nov 2008, address@hidden wrote:
Don't use std::swap, it appears to corrupt the data.