Esempio n. 1
0
 //+------------------------------------------------------------------+
 //| Manager API shutdown                                             |
 //+------------------------------------------------------------------+
 void Shutdown()
 {
     //--- free request sink
     if (m_request_sink != null)
     {
         m_request_sink.Dispose();
         m_request_sink = null;
     }
     //--- free order sink
     if (m_order_sink != null)
     {
         m_order_sink.Dispose();
         m_order_sink = null;
     }
     //--- close answer event
     if (m_event_answer != null)
     {
         m_event_answer.Close();
         m_event_answer = null;
     }
     //--- close requests event
     if (m_event_request != null)
     {
         m_event_request.Close();
         m_event_request = null;
     }
     //--- release request objects
     if (m_request != null)
     {
         m_request.Dispose();
         m_request = null;
     }
     //--- release confirmation objects
     if (m_confirm != null)
     {
         m_confirm.Dispose();
         m_confirm = null;
     }
     //--- if manager interface was created
     if (m_manager != null)
     {
         //--- release manager interface
         m_manager.Dispose();
         m_manager = null;
     }
     //--- parent
     m_parent = null;
 }
Esempio n. 2
0
 //+------------------------------------------------------------------+
 //| Shutdown                                                         |
 //+------------------------------------------------------------------+
 public void Shutdown()
 {
     if (m_deal_array != null)
     {
         m_deal_array.Dispose();
         m_deal_array = null;
     }
     if (m_manager != null)
     {
         m_manager.Dispose();
         m_manager = null;
     }
     if (m_user != null)
     {
         m_user.Dispose();
         m_user = null;
     }
     if (m_account != null)
     {
         m_account.Dispose();
         m_account = null;
     }
     SMTManagerAPIFactory.Shutdown();
 }