diff options
author | Justin Clark-Casey (justincc) | 2012-04-30 15:54:35 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-30 15:54:35 +0100 |
commit | 522eff61383e9a8acfdf34289cd64a8fdc27bb19 (patch) | |
tree | 3e9d6428bf6832caafd69d45c3a377a9f643dcae /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | Comment out debug [ASYNC DELETER] messages for now. (diff) | |
download | opensim-SC-522eff61383e9a8acfdf34289cd64a8fdc27bb19.zip opensim-SC-522eff61383e9a8acfdf34289cd64a8fdc27bb19.tar.gz opensim-SC-522eff61383e9a8acfdf34289cd64a8fdc27bb19.tar.bz2 opensim-SC-522eff61383e9a8acfdf34289cd64a8fdc27bb19.tar.xz |
Consistently use using() to make sure we dispose of used MySqlCommands where this is not already being done.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index d1f1932..0614879 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -329,11 +329,12 @@ namespace OpenSim.Data.MySQL | |||
329 | if (scopeID != UUID.Zero) | 329 | if (scopeID != UUID.Zero) |
330 | command += " and ScopeID = ?scopeID"; | 330 | command += " and ScopeID = ?scopeID"; |
331 | 331 | ||
332 | MySqlCommand cmd = new MySqlCommand(command); | 332 | using (MySqlCommand cmd = new MySqlCommand(command)) |
333 | 333 | { | |
334 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | 334 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); |
335 | 335 | ||
336 | return RunCommand(cmd); | 336 | return RunCommand(cmd); |
337 | } | ||
337 | } | 338 | } |
338 | } | 339 | } |
339 | } | 340 | } \ No newline at end of file |