RE: Copy-on-write for C++ XML Security's safeBuffer class

2006-12-15 Thread Scott Cantor
> Has anyone considered whether copy-on-write semantics would be useful > for safeBuffers? Or getting rid of them entirely? I'm not sure that wouldn't be less error prone than reference counting, but maybe I'm unusually allergic to it. > I'm not particularly familiar with the code base, so I'm no

Copy-on-write for C++ XML Security's safeBuffer class

2006-12-14 Thread Jesse Pelton
Has anyone considered whether copy-on-write semantics would be useful for safeBuffers? Under a profiler, it looks like my application spends an astonishing amount of time in the memcpy() in safeBuffer::operator= (const safeBuffer &). If safeBuffer strings are typically written after being copied,