aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2016-11-18 00:12:09 +0000
committerUbitUmarov2016-11-18 00:12:09 +0000
commitba7904a3a80713f726d434fc82e9a80306372e2c (patch)
tree0686b2c9132db1a2481957fbf9ad98d660d332c5 /OpenSim/Region
parent counting issus safeguard (diff)
downloadopensim-SC_OLD-ba7904a3a80713f726d434fc82e9a80306372e2c.zip
opensim-SC_OLD-ba7904a3a80713f726d434fc82e9a80306372e2c.tar.gz
opensim-SC_OLD-ba7904a3a80713f726d434fc82e9a80306372e2c.tar.bz2
opensim-SC_OLD-ba7904a3a80713f726d434fc82e9a80306372e2c.tar.xz
a few more changes on potencial mem issues
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 98c2e71..2ae0881 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -1483,6 +1483,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1483 1483
1484 lock (diskLock) 1484 lock (diskLock)
1485 { 1485 {
1486 Stream stream = null;
1486 try 1487 try
1487 { 1488 {
1488 if (!Directory.Exists(dir)) 1489 if (!Directory.Exists(dir))
@@ -1490,8 +1491,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1490 Directory.CreateDirectory(dir); 1491 Directory.CreateDirectory(dir);
1491 } 1492 }
1492 1493
1493 using(Stream stream = File.Open(filename, FileMode.Create)) 1494 stream = File.Open(filename, FileMode.Create);
1494 ok = mesh.ToStream(stream); 1495 ok = mesh.ToStream(stream);
1495 } 1496 }
1496 catch (IOException e) 1497 catch (IOException e)
1497 { 1498 {
@@ -1500,6 +1501,11 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1500 filename, e.Message, e.StackTrace); 1501 filename, e.Message, e.StackTrace);
1501 ok = false; 1502 ok = false;
1502 } 1503 }
1504 finally
1505 {
1506 if(stream != null)
1507 stream.Dispose();
1508 }
1503 1509
1504 if (!ok && File.Exists(filename)) 1510 if (!ok && File.Exists(filename))
1505 { 1511 {