static void PyJudyIntSet_dealloc(PyJudyIntSet* self) { if (self->s) { JError_t JError; Word_t w = Judy1FreeArray(&self->s, &JError); if (w == JERR) print_word_and_error("PyJudyIntSet_dealloc", w, &JError); self->s = 0; } self->ob_type->tp_free((PyObject*)self); }
unsigned long flx_collector_t::reap () { unsigned long count = 0; Word_t next=(Word_t)NULL; int res = Judy1First(j_tmp,&next,&je); while(res) { delete_frame((void *)(void*)next); ++count; res = Judy1Next(j_tmp,&next,&je); } Judy1FreeArray(&j_tmp,&je); if(debug) { fprintf(stderr,"Reaped %lu objects\n",count); fprintf(stderr,"Still allocated %lu objects occupying %lu bytes\n", get_allocation_count(), get_allocation_amt()); } return count; }
int ugh_client_del(ugh_client_t *c) { ev_io_stop(loop, &c->wev_recv); ev_io_stop(loop, &c->wev_send); ev_timer_stop(loop, &c->wev_timeout); close(c->wev_recv.fd); JudyLFreeArray(&c->args_hash, PJE0); JudyLFreeArray(&c->headers_hash, PJE0); JudyLFreeArray(&c->headers_out_hash, PJE0); Judy1FreeArray(&c->cookies_out_hash, PJE0); #if 1 JudyLFreeArray(&c->vars_hash, PJE0); #endif aux_pool_free(c->pool); return 0; }
/* * decorated module cleanup (if judy active) */ int decorated_module_cleanup(void) { #ifdef _WAVE_HAVE_JUDY if(GLOBALS->sym_tree) { JudySLFreeArray(&GLOBALS->sym_tree, PJE0); } if(GLOBALS->sym_tree_addresses) { int rcValue; Word_t Index = 0; for (rcValue = Judy1First(GLOBALS->sym_tree_addresses, &Index, PJE0); rcValue != 0; rcValue = Judy1Next(GLOBALS->sym_tree_addresses, &Index, PJE0)) { ((struct tree *)Index)->children_in_gui = 0; } Judy1FreeArray(&GLOBALS->sym_tree_addresses, PJE0); } #endif return(1); }
static int PyJudyIntSet_init(PyJudyIntSet* self, PyObject* args, PyObject* kwds) { self->allow_print = 1; PyObject* allow_print = Py_True; static char* kwargs[] = {"allow_print", 0}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", kwargs, &PyBool_Type, &allow_print)) return -1; if (allow_print == Py_False) self->allow_print = 0; if (self->s) { JError_t JError; Word_t w = Judy1FreeArray(&self->s, &JError); if (w == JERR) print_word_and_error("PyJudyIntSet_init", w, &JError); self->s = 0; } return 0; }
void destroy_s_selected(void) { Judy1FreeArray(&GLOBALS->s_selected, PJE0); GLOBALS->s_selected = NULL; }
void jmap_free(const struct jmap *map) { free((char *)map->errstr); Judy1FreeArray((PPvoid_t)&map->judy, PJE0); free((void *)map); }