From 2cb24cefb2652870a457104d4f3ce6802ef9e16c Mon Sep 17 00:00:00 2001 From: Toni Alatalo Date: Wed, 14 Sep 2005 13:59:43 +0000 Subject: [PATCH] =bpy beztriple: finally got the mem. management right with the help of khughes. --- source/blender/python/api2_2x/BezTriple.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/python/api2_2x/BezTriple.c b/source/blender/python/api2_2x/BezTriple.c index 3cdce19ab9c..13280c9e8c5 100644 --- a/source/blender/python/api2_2x/BezTriple.c +++ b/source/blender/python/api2_2x/BezTriple.c @@ -404,6 +404,7 @@ PyObject *BezTriple_CreatePyObject( BezTriple * bzt ) "couldn't create BPy_BezTriple object" ); pybeztriple->beztriple = bzt; + pybeztriple->own_memory = 0; return ( PyObject * ) pybeztriple; } @@ -496,9 +497,7 @@ PyObject *newBezTriple( PyObject *args) pybez->beztriple = MEM_callocN( sizeof( BezTriple ), "new bpytriple"); /* check malloc */ - pybez->own_memory = 0; /* we own it. must free later */ - /* set to 0 for creating to work. how should freeing be done? */ - + pybez->own_memory = 1; /* we own it. must free later */ switch( length ) { case 9: {