Ooh. Don't delete memory returned from Buffer::Data. It returns a pointer
to the memory used by the Buffer instance. No copy is occurring. It is
automatically cleaned up when the Buffer instance leaves scope. Which will
cause it to fail with a double pointer exception if you free it prematurely.

So you'll only need to clean up resources you create. If the char* is from
Buffer::Data then it will be cleaned up on its own.

I'm not completely caught up with your conversation, but fwiw Buffer::Data
only returns char* not const char*. If you need to pass it as const then
use const_cast<const char*>(data).