void set_delete_l(intset_t *set) { node_t *node, *next; node = set->head; while (node != NULL) { next = node->next; ssfree((void*) node); /* TODO : fix with ssmem */ node = next; } ssfree(set); }
/** Destroy the buffer. * @param b a buffer created with ss_create_buffer() * */ void ss_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) ssfree((void *) b->yy_ch_buf ); ssfree((void *) b ); }
void set_delete_l(intset_l_t *set) { node_l_t *node, *next; node = set->head; while (node != NULL) { next = node->next; DESTROY_LOCK(&node->lock); /* free(node); */ ssfree((void*) node); /* TODO : fix with ssmem */ node = next; } ssfree(set); }
// Destructor VapourSynther::~VapourSynther(void) { ASSERT(!references); while (pending_requests > 0); delete [] packedPlane1; delete [] packedPlane2; if (se) { if (vsapi) vsapi->freeFrame(lastFrame); vseval_freeScript(se); se = NULL; } ssfree(lastStringValue); ssfree(errText); }
void node_delete_l(node_l_t *node) { DESTROY_LOCK(&node->lock); #if GC == 1 ssfree((void*) node); #endif }
int fraser_find(sl_intset_t *set, slkey_t key, val_t *val) { sl_node_t **succs; int result; /* succs = (sl_node_t **)malloc(*levelmax * sizeof(sl_node_t *)); */ succs = (sl_node_t **)ssalloc(*levelmax * sizeof(sl_node_t *)); fraser_search(set, key, NULL, succs); result = (succs[0]->key == key && !succs[0]->deleted); *val = succs[0]->val; // garbage if result = 0 /* free(succs); */ ssfree(succs); return result; }
int fraser_remove(sl_intset_t *set, slkey_t key, val_t *val, int remove_succ) { sl_node_t **succs; int result; /* succs = (sl_node_t **)malloc(*levelmax * sizeof(sl_node_t *)); */ succs = (sl_node_t **)ssalloc(*levelmax * sizeof(sl_node_t *)); fraser_search(set, key, NULL, succs); if (remove_succ) { result = (succs[0]->next[0] != NULL); // Don't remove tail key = succs[0]->key; *val = succs[0]->val; } else { result = (succs[0]->key == key); *val = succs[0]->val; } if (result == 0) goto end; /* 1. Node is logically deleted when the deleted field is not 0 */ if (succs[0]->deleted) { result = 0; goto end; } if (ATOMIC_FETCH_AND_INC_FULL(&succs[0]->deleted) == 0) { /* 2. Mark forward pointers, then search will remove the node */ mark_node_ptrs(succs[0]); /* MEM_BARRIER; */ fraser_search(set, key, NULL, NULL); } else { result = 0; } end: /* free(succs); */ ssfree(succs); return result; }
/* sslex_destroy is for both reentrant and non-reentrant scanners. */ int sslex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ ss_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; sspop_buffer_state(); } /* Destroy the stack itself. */ ssfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * sslex() is called, initialization will occur. */ yy_init_globals( ); return 0; }
SaveState::~SaveState() { ssfree(); delete tqs_; delete [] acell_; }