Blender Git Loki
Git Commits -> Revision b7a4a6c
Revision b7a4a6c by Ken Hughes (master) November 30, 2005, 08:18 (GMT) |
-- Bugfix #3186: Fix memory leaks caused by multiple calls to PyDict_SetItemString() with objects that were not properly decrefed afterwards. Due to the number of places this was used, I added a wrapper EXPP_dict_set_item_str() to gen_utils.c to handle it. This started as a scriptlink bug, due to how many times scripts were being executed I think it just magnified how bad the memory leak in BPy was. Animating the blend attached with this bug report would cause memory to grow by about 3MB for every 280 frames. After the patch, memory did not appear to grow at all (or at least not noticably using Unix's ps and top utils). Since many of the PyDict_SetItemString() calls were in initialization modules I think my tests executed most of the changed code, but would appreciate script users really giving feedback. |
Commit Details:
Full Hash: b7a4a6c8374e808837e45829ec85c48a409efd74
SVN Revision: 5980
Parent Commit: 00f4310
Lines Changed: +60, -47
11 Modified Paths:
/source/blender/python/api2_2x/BGL.c (+2, -2) (Diff)
/source/blender/python/api2_2x/Blender.c (+9, -9) (Diff)
/source/blender/python/api2_2x/constant.c (+2, -2) (Diff)
/source/blender/python/api2_2x/Draw.c (+6, -4) (Diff)
/source/blender/python/api2_2x/Effect.c (+1, -1) (Diff)
/source/blender/python/api2_2x/gen_utils.c (+13, -0) (Diff)
/source/blender/python/api2_2x/gen_utils.h (+3, -0) (Diff)
/source/blender/python/api2_2x/Lattice.c (+2, -2) (Diff)
/source/blender/python/api2_2x/Sys.c (+2, -2) (Diff)
/source/blender/python/BPY_interface.c (+18, -19) (Diff)
/source/blender/src/pub/license_key.c (+2, -6) (Diff)
/source/blender/python/api2_2x/Blender.c (+9, -9) (Diff)
/source/blender/python/api2_2x/constant.c (+2, -2) (Diff)
/source/blender/python/api2_2x/Draw.c (+6, -4) (Diff)
/source/blender/python/api2_2x/Effect.c (+1, -1) (Diff)
/source/blender/python/api2_2x/gen_utils.c (+13, -0) (Diff)
/source/blender/python/api2_2x/gen_utils.h (+3, -0) (Diff)
/source/blender/python/api2_2x/Lattice.c (+2, -2) (Diff)
/source/blender/python/api2_2x/Sys.c (+2, -2) (Diff)
/source/blender/python/BPY_interface.c (+18, -19) (Diff)
/source/blender/src/pub/license_key.c (+2, -6) (Diff)