示例#1
0
        // Release current code (and remove from cache if last ref)
        private void UncacheCode()
        {
            // Note that cachedentry can be null if the constructor never
            // completed because of an exception. The finalizer can
            // still be called.

            if (cachedentry == null)
            {
                return;
            }

            cachedentry.Release();
            //XXX: String key = ((int) roptions).ToString(NumberFormatInfo.InvariantInfo) + ":" + pattern;

            String key = ((int)roptions).ToString() + ":" + pattern;

            if (cachedentry.NoReferences())
            {
                lock (livecode) {
                    if (cachedentry.NoReferences())
                    {
                        if (livecode[key] == cachedentry)
                        {
                            livecode.Remove(key);
                        }
                    }
                }
            }
        }