/// <summary>
        ///
        /// </summary>
        public void Dispose()
        {
            lock (this)
            {
                if (_orders != null)
                {
                    _orders.UnInitialize();
                    _orders.Dispose();
                    _orders = null;
                }

                if (_adapter != null)
                {
                    _adapter = null;
                }

                if (_core != null)
                {
                    _desk = null;
                    _core = null;
                }

                if (_messageLoopOperator != null)
                {
                    _messageLoopOperator.Stop();
                    _messageLoopOperator.Dispose();
                    _messageLoopOperator = null;
                }

                ChangeOperationalState(OperationalStateEnum.Disposed);
            }

            //GC.Collect();
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        public override void Dispose()
        {
            DisposeManager();

            FXCMData data = _data;

            if (data != null)
            {
                data.Dispose();
                _data = null;
            }

            if (_orders != null)
            {
                _orders.Dispose();
                _orders = null;
            }
        }