*fixed a memory leak when printing a referenced usertype.

This commit is contained in:
paladin-t 2016-01-25 11:16:01 +08:00
parent 8b1ca15b45
commit cb9350f1c2
2 changed files with 4 additions and 0 deletions

View File

@ -1,3 +1,6 @@
Jan. 25 2016
Fixed a memory leak when printing a referenced usertype
Jan. 23 2016
Added lazy evaluation for ranged list

View File

@ -14203,6 +14203,7 @@ _print:
val_ptr->data.usertype_ref->fmt(s, val_ptr->data.usertype_ref->usertype, _get_printer(s));
else
_get_printer(s)(mb_get_type_string(_internal_type_to_public_type(val_ptr->type)));
_unref(&val_ptr->data.usertype_ref->ref, val_ptr->data.usertype_ref);
} else if(val_ptr->type == _DT_TYPE) {
_get_printer(s)(mb_get_type_string(val_ptr->data.type));
#ifdef MB_ENABLE_CLASS