Esempio n. 1
0
        //TODO: The MIEngine doesn't call this, but it should - currently this leaks
        //public static void ReleaseDocumentPositionId(IntPtr positionId)
        //{
        //    lock (_documentPositions)
        //    {
        //        if (!_documentPositions.Remove((int)positionId))
        //        {
        //            throw new ArgumentOutOfRangeException("positionId");
        //        }
        //    }
        //}

        public static void ReleaseCodeContextId(IntPtr codeContextId)
        {
            lock (s_codeContexts)
            {
                if (!s_codeContexts.Remove(codeContextId.ToInt32()))
                {
                    throw new ArgumentOutOfRangeException(nameof(codeContextId));
                }
            }
        }