Esempio n. 1
0
        public void Cleanup()
        {
            // Clean up
            Console.WriteLine("Cleaning up...");
            if (_eventQueue != null)
            {
                _eventQueue.Deactivate();
            }
            if (_ommConsumer != null)
            {
                if (_loginHandle != 0)
                {
                    _ommConsumer.UnregisterClient(_loginHandle);
                    _loginHandle = 0;
                }
                _ommConsumer.Destroy();
                _ommConsumer = null;
            }
            if (_session != null)
            {
                _session.Release();
                _session = null;
            }
            if (_eventQueue != null)
            {
                _eventQueue.Destroy();
                _eventQueue = null;
            }
            if (_stgConfigDb != null)
            {
                _stgConfigDb.Destroy();
                _stgConfigDb = null;
            }
            if (_configDb != null)
            {
                _configDb.Release();
            }

            if (_rdmFieldDictionary != null)
            {
                _rdmFieldDictionary.Destroy();
            }

            if ((!Context.Uninitialize()) && (Context.InitializedCount == 0))
            {
                Console.WriteLine("RFA Context fails to uninitialize.");
            }

            CtrlBreakHandler.Exit();
        }