Skip to content

Commit cbe7e7c

Browse files
committed
Merge pull request #221 from btolfa/forgotten-virtual-dtor
Added forgotten virtual dtor for `Json::CharReader::Factory`. (Without this, the destructor of the derived `CharReaderBuilder` would not be called, which is a small memory leak.)
2 parents 951bd3d + be183de commit cbe7e7c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/json/reader.h

+1
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ class JSON_API CharReader {
270270

271271
class Factory {
272272
public:
273+
virtual ~Factory() {}
273274
/** \brief Allocate a CharReader via operator new().
274275
* \throw std::exception if something goes wrong (e.g. invalid settings)
275276
*/

0 commit comments

Comments
 (0)