diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs index 2c20ef7719..c270d98ee7 100644 --- a/OpenSim/Framework/TaskInventoryDictionary.cs +++ b/OpenSim/Framework/TaskInventoryDictionary.cs @@ -64,6 +64,13 @@ namespace OpenSim.Framework /// private volatile System.Threading.ReaderWriterLockSlim m_itemLock = new System.Threading.ReaderWriterLockSlim(); + + ~TaskInventoryDictionary() + { + m_itemLock.Dispose(); + m_itemLock = null; + } + /// /// Are we readlocked by the calling thread? ///