//------------------------------------------------------------------- Node::~Node() { //delete fileout ; BootStrap *bs ; for (bs = j_bootstraps; bs!=NULL;bs = j_bootstraps) { REMOVE_ELEMENT(j_bootstraps, bs); SAFE_DELETE(bs) ; } if (_state) delete _state ; osip_mutex_destroy (gl_lock); if(th_stabilize) delete th_stabilize ; if(th_transport) delete th_transport ; if(adosip) delete adosip ; if(fingerTable) delete fingerTable ; if(user_info_pipe) delete user_info_pipe; if(constants) delete constants ; }
void osip_fifo_free (osip_fifo_t * ff) { if (ff == NULL) return; #ifdef OSIP_MT osip_mutex_destroy (ff->qislocked); /* seems that pthread_mutex_destroy does not free space by itself */ osip_sem_destroy (ff->qisempty); #endif osip_free (ff); }
int osip_cond_destroy (struct osip_cond *_cond) { if (!_cond) return 0; if (_cond->sem == NULL) return 0; osip_sem_destroy (_cond->sem); if (_cond->mut == NULL) return 0; osip_mutex_destroy (_cond->mut); osip_free (_cond); return (0); }