diff options
author | Justin Clark-Casey (justincc) | 2011-09-06 22:44:34 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-06 22:44:34 +0100 |
commit | 3d4d3427cd2c61b982b602eeba0ec7105ae9be50 (patch) | |
tree | c0d65a04702c4745e20eb2eb916af460ba3a28c7 /OpenSim/Region/Framework/Scenes | |
parent | Comment out unused ISceneViewer.Reset() to reduce code complexity (diff) | |
download | opensim-SC_OLD-3d4d3427cd2c61b982b602eeba0ec7105ae9be50.zip opensim-SC_OLD-3d4d3427cd2c61b982b602eeba0ec7105ae9be50.tar.gz opensim-SC_OLD-3d4d3427cd2c61b982b602eeba0ec7105ae9be50.tar.bz2 opensim-SC_OLD-3d4d3427cd2c61b982b602eeba0ec7105ae9be50.tar.xz |
Comment out SceneViewer.Reset() and stop calling from Close() since this is useless work as a closed scene object is never reset.
Strictly speaking, we could also stop bothering to clear the m_updateTimes and m_partsUpdateQueue if we are sure that the whole SceneViewer is shortly to be garbage collected anyway, but we'll leave them around for now.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneViewer.cs | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 3e0d1db..9ad80b8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -193,37 +193,38 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | public void Reset() | 196 | // public void Reset() |
197 | { | 197 | // { |
198 | if (m_pendingObjects == null) | 198 | // if (m_pendingObjects == null) |
199 | return; | 199 | // return; |
200 | 200 | // | |
201 | lock (m_pendingObjects) | 201 | // lock (m_pendingObjects) |
202 | { | 202 | // { |
203 | if (m_pendingObjects != null) | 203 | // if (m_pendingObjects != null) |
204 | { | 204 | // { |
205 | m_pendingObjects.Clear(); | 205 | // m_pendingObjects.Clear(); |
206 | m_pendingObjects = null; | 206 | // m_pendingObjects = null; |
207 | } | 207 | // } |
208 | } | 208 | // } |
209 | } | 209 | // } |
210 | 210 | ||
211 | public void Close() | 211 | public void Close() |
212 | { | 212 | { |
213 | lock (m_pendingObjects) | 213 | lock (m_pendingObjects) |
214 | { | 214 | { |
215 | // We perform this under the m_pendingObjects lock in order to avoid a race condition with another | ||
216 | // thread on SendPrimUpdates() | ||
215 | IsEnabled = false; | 217 | IsEnabled = false; |
216 | 218 | ||
217 | lock (m_updateTimes) | 219 | lock (m_updateTimes) |
218 | { | 220 | { |
219 | m_updateTimes.Clear(); | 221 | m_updateTimes.Clear(); |
220 | } | 222 | } |
223 | |||
221 | lock (m_partsUpdateQueue) | 224 | lock (m_partsUpdateQueue) |
222 | { | 225 | { |
223 | m_partsUpdateQueue.Clear(); | 226 | m_partsUpdateQueue.Clear(); |
224 | } | 227 | } |
225 | |||
226 | Reset(); | ||
227 | } | 228 | } |
228 | } | 229 | } |
229 | 230 | ||