This might be too late for 3.0 but I think it's a worthwhile simpification.
This patch replaces RefCountedBuffer with RefCountedPointer<Buffer>,
where Buffer just holds an array of chars, a type and the is_null
flag. All the reference-counting is handled by the RefCountedPointer
class template.
This simplifies the Buffer class, and the code that uses it no longer
needs explicit (and therefore error-prone) calls to attach() and
dec_ref_count(). Copying and assigning to buffer_ does the Right
Thing because RefCountedPointer handles it all correctly.
./dtest runs without errors, with and without valgrind.
Jon
Attachment: [text/x-patch] mysqlpp-buffer.patch