THRIFT-926. cpp: TMemoryBuffer: Uphold the strong exception safety guarantee
authorDavid Reiss <dreiss@apache.org>
Wed, 6 Oct 2010 17:10:46 +0000 (17:10 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 6 Oct 2010 17:10:46 +0000 (17:10 +0000)
commitece1a089eccad21f093de72b5fe6d730d132812c
tree6d6d894d220f8e400dbb21ad2e35e72c664b7619
parent54bec5dbd8f91305d2cd1d1f1125cf8b54fdd6bc
THRIFT-926. cpp: TMemoryBuffer: Uphold the strong exception safety guarantee

Previously, if we had a realloc failure when growing a TMemoryBuffer, we
would leave the buffer in an invalid state (bufferSize_ would reflect
the desired size, rather than the actual size).  Now, we make no change
to any member variables if realloc fails.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005165 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/transport/TBufferTransports.cpp