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).
This commit is contained in:
Lukas Toenne 2013-10-17 20:18:48 +00:00
parent 4230b8f9c4
commit 2871b0d7df

@ -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) {