[Bf-blender-cvs] CVS commit: blender/source/blender/python BPY_interface.c blender/source/blender/python/api2_2x BGL.c Blender.c Draw.c Effect.c Lattice.c Sys.c constant.c gen_utils.c gen_utils.h blender/source/blender/src/pub license_key.c
Ken Hughes
khughes at pacific.edu
Wed Nov 30 09:18:06 CET 2005
khughes (Ken Hughes) 2005/11/30 09:18:06 CET
Modified files:
blender/source/blender/python BPY_interface.c
blender/source/blender/python/api2_2x BGL.c Blender.c Draw.c
Effect.c Lattice.c Sys.c
constant.c gen_utils.c
gen_utils.h
blender/source/blender/src/pub license_key.c
Log:
-- 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.
Revision Changes Path
1.79 +19 -20 blender/source/blender/python/BPY_interface.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/BPY_interface.c.diff?r1=1.78&r2=1.79&cvsroot=bf-blender>
1.19 +3 -3 blender/source/blender/python/api2_2x/BGL.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/BGL.c.diff?r1=1.18&r2=1.19&cvsroot=bf-blender>
1.71 +10 -10 blender/source/blender/python/api2_2x/Blender.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/Blender.c.diff?r1=1.70&r2=1.71&cvsroot=bf-blender>
1.42 +7 -5 blender/source/blender/python/api2_2x/Draw.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/Draw.c.diff?r1=1.41&r2=1.42&cvsroot=bf-blender>
1.22 +2 -2 blender/source/blender/python/api2_2x/Effect.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/Effect.c.diff?r1=1.21&r2=1.22&cvsroot=bf-blender>
1.20 +3 -3 blender/source/blender/python/api2_2x/Lattice.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/Lattice.c.diff?r1=1.19&r2=1.20&cvsroot=bf-blender>
1.20 +3 -3 blender/source/blender/python/api2_2x/Sys.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/Sys.c.diff?r1=1.19&r2=1.20&cvsroot=bf-blender>
1.18 +3 -3 blender/source/blender/python/api2_2x/constant.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/constant.c.diff?r1=1.17&r2=1.18&cvsroot=bf-blender>
1.39 +14 -1 blender/source/blender/python/api2_2x/gen_utils.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/gen_utils.c.diff?r1=1.38&r2=1.39&cvsroot=bf-blender>
1.35 +4 -1 blender/source/blender/python/api2_2x/gen_utils.h
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/gen_utils.h.diff?r1=1.34&r2=1.35&cvsroot=bf-blender>
1.6 +3 -7 blender/source/blender/src/pub/license_key.c
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/src/pub/license_key.c.diff?r1=1.5&r2=1.6&cvsroot=bf-blender>
More information about the Bf-blender-cvs
mailing list