From b299d3581f4dc670734f1fe1a34fce1282337802 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Wed, 20 Jul 2016 11:31:41 -0700 Subject: [PATCH] Allow dtor for nullSingleton re #488 and #490 --- src/lib_json/json_value.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 1d86883..2fe4630 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -39,8 +39,8 @@ namespace Json { // static Value const& Value::nullSingleton() { - static Value const* nullStatic = new Value; - return *nullStatic; + static Value const nullStatic; + return nullStatic; } // for backwards compatibility, we'll leave these global references around, but DO NOT