diff options
author | lecoanet | 2005-01-18 14:53:32 +0000 |
---|---|---|
committer | lecoanet | 2005-01-18 14:53:32 +0000 |
commit | a56b4764d2773a957658e496b0e2863e27b0bca9 (patch) | |
tree | 14b193df163adc4faab60a059738bdab1710f7ee /generic/Curve.c | |
parent | a3d6f9cf8c4b2212ad9482619a14c0726a6ea017 (diff) | |
download | tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.zip tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.tar.gz tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.tar.bz2 tkzinc-a56b4764d2773a957658e496b0e2863e27b0bca9.tar.xz |
Fixed a big memory leak in Geo.c related to polys and tristrips.
Fixed a typo in the find closest command related to atomic groups.
Diffstat (limited to 'generic/Curve.c')
-rw-r--r-- | generic/Curve.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/Curve.c b/generic/Curve.c index b580d56..1ce76e5 100644 --- a/generic/Curve.c +++ b/generic/Curve.c @@ -507,7 +507,7 @@ UpdateTristrip(CurveItem cv, unsigned int j, k; int i; - /*printf("UpdateTristrips sur %d\n", ((ZnItem) cv)->id);*/ + //printf("UpdateTristrips sur %d\n", ((ZnItem) cv)->id); gluTessProperty(ZnTesselator.tess, GLU_TESS_WINDING_RULE, (GLdouble) cv->fill_rule); if (cv->tristrip.num_strips == 0) { @@ -552,14 +552,16 @@ UpdateTristrip(CurveItem cv, } gluTessEndPolygon(ZnTesselator.tess); cdata = ZnTesselator.combine_list; + //printf("Combine length: %d\n", ZnTesselator.combine_length); while (cdata) { + ZnTesselator.combine_length--; cnext = cdata->next; ZnFree(cdata); cdata = cnext; } ZnTesselator.combine_list = NULL; } - /*printf("Fin UpdateTristrips sur %d\n", ((ZnItem) cv)->id);*/ + //printf("Fin UpdateTristrips sur %d\n", ((ZnItem) cv)->id); } static void @@ -572,7 +574,7 @@ UpdateOutlines(CurveItem cv, unsigned int j, k; int i; - /*printf("UpdateOutlines sur %d\n", ((ZnItem) cv)->id);*/ + //printf("UpdateOutlines sur %d\n", ((ZnItem) cv)->id); gluTessProperty(ZnTesselator.tess, GLU_TESS_WINDING_RULE, (GLdouble) cv->fill_rule); if (cv->outlines.num_contours == 0) { @@ -611,13 +613,14 @@ UpdateOutlines(CurveItem cv, gluTessEndPolygon(ZnTesselator.tess); cdata = ZnTesselator.combine_list; while (cdata) { + ZnTesselator.combine_length--; cnext = cdata->next; ZnFree(cdata); cdata = cnext; } ZnTesselator.combine_list = NULL; } - /*printf("Fin UpdateOutlines sur %d\n", ((ZnItem) cv)->id);*/ + //printf("Fin UpdateOutlines sur %d\n", ((ZnItem) cv)->id); } |