浏览代码

leak less memory; url fix

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38950 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 15 年之前
父节点
当前提交
3e43c399a8
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 3 0
      vector/v.label.sa/labels.c
  2. 1 2
      vector/v.label.sa/v.label.sa.html

+ 3 - 0
vector/v.label.sa/labels.c

@@ -974,6 +974,8 @@ static double label_flatness(label_t * label, label_candidate_t * candidate)
 
 
     flatness /= sqrt((x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0));	/* this is d'' */
     flatness /= sqrt((x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0));	/* this is d'' */
     flatness = (flatness * flatness) / (ideal_distance * ideal_distance);
     flatness = (flatness * flatness) / (ideal_distance * ideal_distance);
+
+    Vect_destroy_line_struct(line);
     return flatness;
     return flatness;
 }
 }
 
 
@@ -1086,6 +1088,7 @@ static double label_lineover(label_t * label, label_candidate_t * candidate,
 		      sqrt(v.x * v.x + v.y * v.y)));
 		      sqrt(v.x * v.x + v.y * v.y)));
 	    lineover += 1.0 + 9.0 * cosvb;
 	    lineover += 1.0 + 9.0 * cosvb;
 	}
 	}
+	Vect_destroy_line_struct(line);
     }
     }
 
 
     Vect_destroy_list(il);
     Vect_destroy_list(il);

+ 1 - 2
vector/v.label.sa/v.label.sa.html

@@ -29,8 +29,7 @@ The algorithm works by the principle of Simulated Annealing.
 <A HREF="v.labels.html">d.label</A><br>
 <A HREF="v.labels.html">d.label</A><br>
 <A HREF="d.labels.html">d.labels</A><br>
 <A HREF="d.labels.html">d.labels</A><br>
 <A HREF="ps.map.html">ps.map</A>
 <A HREF="ps.map.html">ps.map</A>
-<A href="http://en.wikipedia.org/Simulated_Annealing">Wikipedia article on
-simulated annealing</A>
+<A href="http://en.wikipedia.org/wiki/Simulated_Annealing">Wikipedia article on simulated annealing</A>
 </EM><br>
 </EM><br>
 
 
 <H2>AUTHOR</H2>
 <H2>AUTHOR</H2>