Fix significant memory leak.

Particularly, unserializing a function is frequent and leaked.
This commit is contained in:
Jon Siwek 2013-09-10 16:10:10 -05:00
parent 1fbeefedbc
commit c3a4454892

View file

@ -59,6 +59,9 @@ Val::~Val()
if ( type->InternalType() == TYPE_INTERNAL_STRING )
delete val.string_val;
else if ( type->Tag() == TYPE_FUNC )
Unref(val.func_val);
else if ( type->Tag() == TYPE_FILE )
Unref(val.file_val);