Blender Git Commit Log

Git Commits -> Revision cbaa25e

Revision cbaa25e by Lukas Stockner (master)
May 8, 2016, 15:44 (GMT)
Cycles: Fix two small memory leaks and deduplicate table freeing

This commit makes remove_table skip the freeing if the offset is
already set to invalid - or, if it wasn't, set it to invalid after freeing.

That's what the current code was already doing in the Manager classes,
this change allows them to just call remove without the additional code.

Also, two potential memory leaks where new tables were always allocated
without freeing the old ones are fixed.

Reviewers: sergey, dingto, brecht

Differential Revision: https://developer.blender.org/D1974

Commit Details:

Full Hash: cbaa25eb88a25852791d4f8b18fb9e9137fea401
Parent Commit: 6100c2d
Lines Changed: +15, -20

5 Modified Paths:

/intern/cycles/render/camera.cpp (+2, -8) (Diff)
/intern/cycles/render/film.cpp (+2, -4) (Diff)
/intern/cycles/render/shader.cpp (+2, -5) (Diff)
/intern/cycles/render/tables.cpp (+8, -2) (Diff)
/intern/cycles/render/tables.h (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021