From 5b1980859ad20ad24a02589f4ad72a81a82df3ba Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 28 Mar 2021 17:28:26 +1100 Subject: Workaround T86992: Tagged ID deletion conflicts with freeing objects da160dc32d1518dc3e59a8fb7995b59c88870444 exposed a bug in `BKE_id_multi_tagged_delete` causing a memory leak in soft-body that made `physics_softbody` test fail. Use a loop to remove ID's to keep tests working until T86992 is fixed. --- source/blender/editors/object/object_add.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index c0b31d6ed65..246c97c6078 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1997,7 +1997,15 @@ static int object_delete_exec(bContext *C, wmOperator *op) } if (tagged_count > 0) { +#if 0 /* Temporary workaround for bug in tagged delete, see: T86992 */ BKE_id_multi_tagged_delete(bmain); +#else + LISTBASE_FOREACH_MUTABLE (Object *, ob, &bmain->objects) { + if (ob->id.tag & LIB_TAG_DOIT) { + BKE_id_delete(bmain, &ob->id); + } + } +#endif } BKE_reportf(op->reports, RPT_INFO, "Deleted %u object(s)", (changed_count + tagged_count)); -- cgit v1.2.3