diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 35f1e9a8e..99d46c298 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -5200,6 +5200,7 @@ void FileStorage::release() string FileStorage::releaseAndGetString() { string buf; + buf.reserve(16); // HACK: Work around for compiler bug if( fs.obj && fs.obj->outbuf ) icvClose(fs.obj, &buf);