| 32 | } |
| 33 | |
| 34 | RTDServer::~RTDServer() |
| 35 | { |
| 36 | //Clean up the type information |
| 37 | if (m_pTypeInfoInterface != NULL){ |
| 38 | m_pTypeInfoInterface->Release(); |
| 39 | m_pTypeInfoInterface = NULL; |
| 40 | } |
| 41 | |
| 42 | //Make sure we kill the data thread |
| 43 | if (m_dwDataThread != -1){ |
| 44 | PostThreadMessage( m_dwDataThread, WM_COMMAND, WM_SILENTTERMINATE, 0 ); |
| 45 | } |
| 46 | |
| 47 | //Decrement the object count |
| 48 | InterlockedDecrement( &g_cOb ); |
| 49 | |
| 50 | for (Monitors::iterator iMonitor = this->monitors.begin(); iMonitor != this->monitors.end(); ++iMonitor) { |
| 51 | delete iMonitor->second; |
| 52 | } |
| 53 | |
| 54 | Monitor::RTDMonitor::shutdown(); |
| 55 | } |
| 56 | |
| 57 | /****************************************************************************** |
| 58 | * LoadTypeInfo -- Gets the type information of an object's interface from the |