/* Destroys CoreCmdProxy instance. */ void coreCmdProxy_destroy(void) { if (_coreCmdProxy.sync_writer != NULL) { syncsocket_close(_coreCmdProxy.sync_writer); syncsocket_free(_coreCmdProxy.sync_writer); _coreCmdProxy.sync_writer = NULL; } if (_coreCmdProxy.sync_reader != NULL) { syncsocket_close(_coreCmdProxy.sync_reader); syncsocket_free(_coreCmdProxy.sync_reader); _coreCmdProxy.sync_reader = NULL; } if (_coreCmdProxy.core_connection != NULL) { core_connection_close(_coreCmdProxy.core_connection); core_connection_free(_coreCmdProxy.core_connection); _coreCmdProxy.core_connection = NULL; } }
void syncsocket_free(SyncSocket* ssocket) { if (ssocket != NULL) { syncsocket_close(ssocket); if (ssocket->iolooper != NULL) { iolooper_free(ssocket->iolooper); } free(ssocket); } }
void userEventsProxy_destroy(void) { if (_userEventsProxy.sync_writer != NULL) { syncsocket_close(_userEventsProxy.sync_writer); syncsocket_free(_userEventsProxy.sync_writer); _userEventsProxy.sync_writer = NULL; } if (_userEventsProxy.core_connection != NULL) { core_connection_close(_userEventsProxy.core_connection); core_connection_free(_userEventsProxy.core_connection); _userEventsProxy.core_connection = NULL; } }
void uiCmdProxy_destroy() { if (_uiCmdProxy.sync_writer != NULL) { syncsocket_close(_uiCmdProxy.sync_writer); syncsocket_free(_uiCmdProxy.sync_writer); } if (_uiCmdProxy.looper != NULL) { loopIo_done(&_uiCmdProxy.io); looper_free(_uiCmdProxy.looper); _uiCmdProxy.looper = NULL; } _uiCmdProxy.sock = -1; }
void coreCmdImpl_destroy() { // Destroy the writer if (_coreCmdImpl.sync_writer != NULL) { syncsocket_close(_coreCmdImpl.sync_writer); syncsocket_free(_coreCmdImpl.sync_writer); } if (_coreCmdImpl.looper != NULL) { // Stop all I/O that may still be going on. loopIo_done(&_coreCmdImpl.io); looper_free(_coreCmdImpl.looper); _coreCmdImpl.looper = NULL; } // Free allocated memory. _free_cmd_param_buf(&_coreCmdImpl); }