System.SharedStatics.ReleaseSharedStringMaker C# (CSharp) Method

ReleaseSharedStringMaker() static public method

static public ReleaseSharedStringMaker ( System.Security.Util.Tokenizer.StringMaker &maker ) : void
maker System.Security.Util.Tokenizer.StringMaker
return void
        static public void ReleaseSharedStringMaker(ref StringMaker maker)
        {
            // save this stringmaker so someone else can use it
            bool tookLock = false;
            RuntimeHelpers.PrepareConstrainedRegions();
            try
            {
                Monitor.ReliableEnter(_sharedStatics, ref tookLock);

                _sharedStatics._maker = maker;
                maker = null;
            }
            finally {
                if (tookLock)
                    Monitor.Exit(_sharedStatics);
            }
        }