f-spot r4621 - in trunk: . src



Author: sdelcroix
Date: Mon Nov 24 21:45:09 2008
New Revision: 4621
URL: http://svn.gnome.org/viewvc/f-spot?rev=4621&view=rev

Log:
close a reader

2008-11-24  Stephane Delcroix  <sdelcroix novell com>

	* src/PhotoStore.cs: Close the reader in IndicesOf

Modified:
   trunk/ChangeLog
   trunk/src/PhotoStore.cs

Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs	(original)
+++ trunk/src/PhotoStore.cs	Mon Nov 24 21:45:09 2008
@@ -732,13 +732,14 @@
 		return index - 1; //ROWID starts counting at 1
 	}
 
-	private int [] IndicesOf (string query)
+	int [] IndicesOf (string query)
 	{
 		uint timer = Log.DebugTimerStart ();
 		List<int> list = new List<int> ();
 		SqliteDataReader reader = Database.Query (query);
 		while (reader.Read ())
 			list.Add (Convert.ToInt32 (reader ["row_id"]) - 1);
+		reader.Close ();
 		Log.DebugTimerPrint (timer, "IndicesOf took {0} : " + query);
 		return list.ToArray ();
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]