diff options
author | Justin Clark-Casey (justincc) | 2012-11-14 04:45:59 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-11-14 04:45:59 +0000 |
commit | 94da908813e42c328572bc5da2ddc41b6664b59c (patch) | |
tree | 1a3e1ffaadb34cac64c798f5cc06eadf612c6af9 /OpenSim/Data/SQLite/SQLiteAssetData.cs | |
parent | If no ISimulationDataStore or IEstateDataStore implementations could be loade... (diff) | |
download | opensim-SC-94da908813e42c328572bc5da2ddc41b6664b59c.zip opensim-SC-94da908813e42c328572bc5da2ddc41b6664b59c.tar.gz opensim-SC-94da908813e42c328572bc5da2ddc41b6664b59c.tar.bz2 opensim-SC-94da908813e42c328572bc5da2ddc41b6664b59c.tar.xz |
More consistently dispose of SqliteCommand in OpenSim.Data.SQLite where possible.
Not doing SQLiteInventoryStore since this is no longer used and should disappear in the future.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index d0e24c3..61e7aaf 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -202,7 +202,8 @@ namespace OpenSim.Data.SQLite | |||
202 | /// <returns>True if exist, or false.</returns> | 202 | /// <returns>True if exist, or false.</returns> |
203 | override public bool ExistsAsset(UUID uuid) | 203 | override public bool ExistsAsset(UUID uuid) |
204 | { | 204 | { |
205 | lock (this) { | 205 | lock (this) |
206 | { | ||
206 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 207 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
207 | { | 208 | { |
208 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); | 209 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); |
@@ -353,12 +354,13 @@ namespace OpenSim.Data.SQLite | |||
353 | { | 354 | { |
354 | lock (this) | 355 | lock (this) |
355 | { | 356 | { |
356 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | 357 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) |
357 | { | 358 | { |
358 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); | 359 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); |
359 | cmd.ExecuteNonQuery(); | 360 | cmd.ExecuteNonQuery(); |
360 | } | 361 | } |
361 | } | 362 | } |
363 | |||
362 | return true; | 364 | return true; |
363 | } | 365 | } |
364 | 366 | ||