[GRASS-SVN] r74205 - grass/trunk/vector/v.select

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 9 10:43:05 PST 2019


Author: mmetz
Date: 2019-03-09 10:43:05 -0800 (Sat, 09 Mar 2019)
New Revision: 74205

Modified:
   grass/trunk/vector/v.select/main.c
Log:
v.select: free memory before building topology for output vector

Modified: grass/trunk/vector/v.select/main.c
===================================================================
--- grass/trunk/vector/v.select/main.c	2019-03-09 18:41:33 UTC (rev 74204)
+++ grass/trunk/vector/v.select/main.c	2019-03-09 18:43:05 UTC (rev 74205)
@@ -190,15 +190,20 @@
 		G_warning(_("%d features from <%s> without category skipped"),
 			  nskipped[iopt], Vect_get_full_name(&(In[iopt])));
 	    }
+	    Vect_set_release_support(&In[iopt]);
 	    Vect_close(&(In[iopt]));
 	}
 
 	Vect_build(&Out);
+	nfound = Vect_get_num_lines(&Out);
+	Vect_set_release_support(&Out);
 	Vect_close(&Out);
 
-	G_done_msg(_("%d features written to output."), Vect_get_num_lines(&Out));
+	G_done_msg(_("%d features written to output."), nfound);
     }
     else {
+	Vect_set_release_support(&In[0]);
+	Vect_set_release_support(&In[1]);
 	Vect_close(&In[0]);
 	Vect_close(&In[1]);
 	G_done_msg(_("No features found !"));



More information about the grass-commit mailing list