[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17487] branches/etch-a-ton/source/blender : Fix leak on exit (it's not a real fix, still uses silly global mem)

Martin Poirier theeth at yahoo.com
Tue Nov 18 00:02:54 CET 2008


Revision: 17487
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17487
Author:   theeth
Date:     2008-11-18 00:02:53 +0100 (Tue, 18 Nov 2008)

Log Message:
-----------
Fix leak on exit (it's not a real fix, still uses silly global mem)

Modified Paths:
--------------
    branches/etch-a-ton/source/blender/include/BIF_editarmature.h
    branches/etch-a-ton/source/blender/src/editarmature_sketch.c
    branches/etch-a-ton/source/blender/src/usiblender.c

Modified: branches/etch-a-ton/source/blender/include/BIF_editarmature.h
===================================================================
--- branches/etch-a-ton/source/blender/include/BIF_editarmature.h	2008-11-17 22:19:05 UTC (rev 17486)
+++ branches/etch-a-ton/source/blender/include/BIF_editarmature.h	2008-11-17 23:02:53 UTC (rev 17487)
@@ -169,11 +169,15 @@
 
 #define BONESEL_NOSEL	0x80000000	/* Indicates a negative number */
 
-/* from autoarmature */
+/* from editarmature_retarget */
 void BIF_retargetArmature();
 void BIF_adjustRetarget();
 void BIF_freeRetarget();
 
+/* from editarmature_sketch */
+void BIF_freeSketch();
+void BIF_freeTemplates();
+
 struct ReebArc;
 float calcVariance(struct ReebArc *arc, int start, int end, float v0[3], float n[3]);
 float calcDistance(struct ReebArc *arc, int start, int end, float head[3], float tail[3]);

Modified: branches/etch-a-ton/source/blender/src/editarmature_sketch.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_sketch.c	2008-11-17 22:19:05 UTC (rev 17486)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c	2008-11-17 23:02:53 UTC (rev 17487)
@@ -2745,3 +2745,12 @@
 		return 0;
 	}
 }
+
+void BIF_freeSketch()
+{
+	if (GLOBAL_sketch != NULL)
+	{
+		sk_freeSketch(GLOBAL_sketch);
+		GLOBAL_sketch = NULL;
+	}
+}

Modified: branches/etch-a-ton/source/blender/src/usiblender.c
===================================================================
--- branches/etch-a-ton/source/blender/src/usiblender.c	2008-11-17 22:19:05 UTC (rev 17486)
+++ branches/etch-a-ton/source/blender/src/usiblender.c	2008-11-17 23:02:53 UTC (rev 17487)
@@ -1104,6 +1104,7 @@
 	BIF_GlobalReebFree();
 	BIF_freeRetarget();
 	BIF_freeTemplates();
+	BIF_freeSketch();
 	
 	tf= G.ttfdata.first;
 	while(tf)





More information about the Bf-blender-cvs mailing list