Workaround T86992: Tagged ID deletion conflicts with freeing objects
da160dc32d
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.
This commit is contained in:
parent
a9e7d503dd
commit
5b1980859a
Notes:
blender-bot
2023-02-13 19:07:16 +01:00
Referenced by issue #86992, Tagged ID deletion conflicts with properly freeing object data
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue