diff src/proto/vim9class.pro @ 33160:4ecf54d709b3 v9.0.1862

patch 9.0.1862: Vim9 Garbage Collection issues Commit: https://github.com/vim/vim/commit/e651e110c17656a263dd017b14c85b332163a58d Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Sep 4 07:51:01 2023 +0200 patch 9.0.1862: Vim9 Garbage Collection issues Problem: Vim9 Garbage Collection issues Solution: Class members are garbage collected early leading to use-after-free problems. Handle the garbage collection of classes properly. closes: #13019 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author Christian Brabandt <cb@256bit.org>
date Mon, 04 Sep 2023 08:00:06 +0200
parents 2b5cc29b0a0e
children 9efd99a717c1
line wrap: on
line diff
--- a/src/proto/vim9class.pro
+++ b/src/proto/vim9class.pro
@@ -12,6 +12,8 @@ void copy_object(typval_T *from, typval_
 void object_unref(object_T *obj);
 void copy_class(typval_T *from, typval_T *to);
 void class_unref(class_T *cl);
+int class_free_nonref(int copyID);
+int set_ref_in_classes(int copyID);
 void object_created(object_T *obj);
 void object_cleared(object_T *obj);
 int object_free_nonref(int copyID);