Fix #34121: OSL + persistent images option was not freeing shader memory properly,

causing memory to increase continuously during animation render.
This commit is contained in:
Brecht Van Lommel
2013-02-14 16:11:47 +00:00
parent a47af30561
commit adbd84c320
9 changed files with 42 additions and 10 deletions

View File

@@ -966,6 +966,14 @@ void MeshManager::device_free(Device *device, DeviceScene *dscene)
dscene->attributes_map.clear();
dscene->attributes_float.clear();
dscene->attributes_float3.clear();
OSLGlobals *og = (OSLGlobals*)device->osl_memory();
if(og) {
og->object_name_map.clear();
og->attribute_map.clear();
og->object_names.clear();
}
}
void MeshManager::tag_update(Scene *scene)