If I declare a temporary auto deleted character buffer using
std::auto_ptr<char> buffer(new char[n]);
then the buffer is automatically deleted when the buffer goes out of scope. I would assume that the buffer is deleted using delete.
However the buffer was created using new[], and so strictly speaking the buffer should be deleted using delete[].
What possibility is there that this mismatch might cause a memory leak?