0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1035: object members are not being marked as used

Problem:    Object members are not being marked as used, garbage collection
            may free them.
Solution:   Mark object members as used.  Fix reference counting.
This commit is contained in:
Bram Moolenaar
2022-12-08 20:42:00 +00:00
parent e5eae82bb7
commit d28d7b94f5
8 changed files with 288 additions and 158 deletions

View File

@@ -3018,7 +3018,9 @@ exec_instructions(ectx_T *ectx)
iptr->isn_arg.construct.construct_size);
tv->vval.v_object->obj_class =
iptr->isn_arg.construct.construct_class;
++tv->vval.v_object->obj_class->class_refcount;
tv->vval.v_object->obj_refcount = 1;
object_created(tv->vval.v_object);
break;
// execute Ex command line