From 2871b0d7df5804e32e9ac4064ab2f29994b69b2d Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Thu, 17 Oct 2013 20:18:48 +0000 Subject: [PATCH] Fix #37110, After deletion of large scene, file still huge. Objects were not being freed when unlinked from all scenes, due to user count increments on the ParticleSystem->parent pointers. These were referencing the objects themselves, creating a user count of 1 and preventing free. Object pointers should not usually do user counting, except in some cases like scenes and groups (thanks to Brecht for clarifying this). --- source/blender/blenloader/intern/readfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 2cc5aa33ab6..e6804725587 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3806,7 +3806,7 @@ static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase for (; pt; pt=pt->next) pt->ob=newlibadr(fd, id->lib, pt->ob); - psys->parent = newlibadr_us(fd, id->lib, psys->parent); + psys->parent = newlibadr(fd, id->lib, psys->parent); psys->target_ob = newlibadr(fd, id->lib, psys->target_ob); if (psys->clmd) {