From ec016f9956a592c039f6af8ebf89df1df8fc79e3 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 9 May 2024 14:17:43 -0700 Subject: [PATCH] deferred obj deletion bit I've no idea whether there are any cases where this matters. --- src/mkobj.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mkobj.c b/src/mkobj.c index 0674a064e..d289dd0fe 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -2702,6 +2702,12 @@ dealloc_obj(struct obj *obj) if (obj == gk.kickedobj) gk.kickedobj = 0; + /* if obj came from the most recent splitobj(), it's no longer eligible + for unsplitobj(); perform inline clear_splitobjs() */ + if (obj->o_id == gc.context.objsplit.parent_oid + || obj->o_id == gc.context.objsplit.child_oid) + gc.context.objsplit.parent_oid = gc.context.objsplit.child_oid = 0; + if (obj->lua_ref_cnt) { /* obj is referenced from a lua script, let lua gc free it */ obj->where = OBJ_LUAFREE;