Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-05-25 20:43:25 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-05-25 20:43:25 +0400
commitf231bd0d5715ac67767f96f3a8d20ebf618f7b03 (patch)
tree34c05572641b2eafad9fa8e342724e0b05b6b3d8 /source/blender/python/api2_2x/constant.c
parenta21f8292d9aeff54153fc65560d56b3d4f33575a (diff)
Many long standing memory leaks fixed in the BPY api.
Data from Armature.c and logic.c still leaks. Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing. Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
Diffstat (limited to 'source/blender/python/api2_2x/constant.c')
-rw-r--r--source/blender/python/api2_2x/constant.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c
index 2f74007f617..3a64de610f1 100644
--- a/source/blender/python/api2_2x/constant.c
+++ b/source/blender/python/api2_2x/constant.c
@@ -144,11 +144,13 @@ static PyObject *constant_getAttro(BPy_constant * self, PyObject *value)
static PyObject *constant_repr(BPy_constant * self)
{
char str[4096];
- PyObject *key, *value;
+ PyObject *key, *value, *tempstr;
int pos = 0;
BLI_strncpy(str,"[Constant: ",4096);
- value = PyDict_GetItem( self->dict, PyString_FromString("name") );
+ tempstr = PyString_FromString("name");
+ value = PyDict_GetItem( self->dict, tempstr );
+ Py_DECREF(tempstr);
if(value) {
strcat(str, PyString_AsString(value));
} else {