Skip to content

Commit 0dbcdc2

Browse files
committed
Fixed memory leak
1 parent e9a6938 commit 0dbcdc2

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/json.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ namespace json {
130130
create(is_undefined);
131131
}
132132

133+
~variant()
134+
{
135+
destroy();
136+
}
137+
133138
variant(variant const &other)
134139
{
135140
create(other.type,other.m);
@@ -277,15 +282,6 @@ namespace json {
277282
};
278283

279284
typedef variant variant_type;
280-
/*typedef boost::variant<
281-
undefined,
282-
null,
283-
bool,
284-
double,
285-
std::string,
286-
json::object,
287-
json::array
288-
> variant_type;*/
289285

290286
struct value::_data {
291287
public:

0 commit comments

Comments
 (0)